Punteam Set team to gameobject Tower
Hello, how to Set team to gameOjbect tower and minions with punteam?
0
Best Answer
-
Hi @Valakinhas,
you can not set a team for a certain object. It is only allowed to set the team of the player. This can be done by usingPhotonNetwork.player.SetTeam(...);
. When your object has a PhotonView component you can access the team of the owner of the object. You can do this by usingGetComponent<PhotonView>().owner.GetTeam();
on the object.1
Answers
-
Hi @Valakinhas,
you can not set a team for a certain object. It is only allowed to set the team of the player. This can be done by usingPhotonNetwork.player.SetTeam(...);
. When your object has a PhotonView component you can access the team of the owner of the object. You can do this by usingGetComponent<PhotonView>().owner.GetTeam();
on the object.1