photonview is.mine

Options
Hi,
I am looking for the script. Where should i use this in unity so all avatars dont run at the same time.
Using third person controll from standar assets.
Thanks

Comments

  • Hi @Unai,

    you should at least insert PhotonView.isMine condition wherever you have input. I currently don't know how ThirdPersonController is built, but you should check Update() and FixedUpdate() functions for input and surround this with if (PhotonView.isMine) condition or add if (!PhotonView.isMine) { return; } before the input handling.

    If you still have problems you can check our Basics Tutorial which provides a good introduction on how to use PUN and its components.
  • noverlin
    Options

    hello. i have a problem. who get property isMine with true value and when it get this value? i thinked, that any photonView get it at photon.Instantiate time, but we can spawn also any things, that isn't player. How distributing values of isMine?

  • Tobias
    Options

    IsMine is usually derived from the ViewID (which includes who created the object). The creator is usually the controller, too.

    Read the PUN Basics Tutorial and the docs, which dive into those topics. It's not useful to repeat this in a thread here.