Punteam Set team to gameobject Tower

Hello, how to Set team to gameOjbect tower and minions with punteam?

Best Answer

  • [Deleted User]
    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 using PhotonNetwork.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 using GetComponent<PhotonView>().owner.GetTeam(); on the object.

Answers

  • [Deleted User]
    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 using PhotonNetwork.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 using GetComponent<PhotonView>().owner.GetTeam(); on the object.