photonview is.mine

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

photonview is.mine

Unai
2017-03-30 04:57:34

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

[Deleted User]
2017-04-03 08:54:00

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
2023-04-02 10:18:43

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
2023-04-03 08:56:33

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.

Back to top