photonView.isMine not working

Hello, i have multiple photonviews to diferents things (rotation, animation, and rpc), all converted with plugin and working well, i made a chat system, empty object with one JS and a photonview, the photonview attached is working fine the chat works, but the photonView.isMine only works for the first connected, i have to workaround this with sendmessages from the object with photonview.ismine working fine. Is this a bug? or what i making wrong?.
Thanks.

Comments

  • Scene photon views (those that are in the scene hierarchy when you load it) should be modified by the "Master Client" only. This is the first in the game. IsMine is true only for the master because of that.
    PhotonViews you instantiate after the scene loaded are owned by the player who instantiated it. IsMine is true for the one player who instantiated the PhotonView.
  • Hello Tobias, thank for the answer, i understand now the diference with scene and instantiated photonviews.
    For the chat i was using the network.instantiate "logic", and asking if photonview.ismine onjoinroom() to set the player name for the chatroom, i build the chat using the m2h chat example, how is the best way to implement the player's name setup for the chatroom with Scene Photonviews, maybe onStart()?.
    Thanks
  • The best way for names is to use the player.name property, actually. You don't have to do much then.
    You can either use RPCs to set stuff like this, or try to use player properties for less-frequently changing data. Player.setCustomProperties() (or similar) should help you for that.
Sign In or Register to comment.