Hi,
if you have a fixed, given number of teams, I suggest you use Unity tag system. Playmaker has many actions using tags as well, this would be a good starting point for team checks.
If you want a flexible amount of team, your suggestion is good. I would create either a Fsm or a script that is responsible for maintaining the tem reference ( and other such meta data). it would be attached to the player or gameObject, and when something wants to check for the team, it would query that Fsm or script,
don't create a prefab per team, that's not a very good practice, even for a given number of team, instead create a prefab that accepts a team ID, and create a small "framework" so that components and things interacting with this prefab can query for the team Id conveniently. If you have only two teams ( and that it's never going to change) then yes, go for hardcoded, will be quicker.
typical example: someone spot a moving target in front, the raycast give you a reference of that object, and you have likely done a good job at filtering this raycast to only detect players, so you know this is a player and you know it has the team Fsm component, query this Fsm for it's Id, check it against yours and then either do nothing if it belongs to the same team or act and fire or do something because it's someone from another team.
It is of course very abstract if you don't really know Unity and playmaker, if you need a working example, I can do something showing what I just explained.
Bye,
Jean
Bye,
Jean