Why does my photon view have no owner/isMine false?

Options
Hello, ive been instantiating players and had no problem; but recently I needed to switch to loading assets from asset bundles. Because of this I need to do manual instantiation. I've copied the code straight from photons documentation here: https://doc.photonengine.com/en-us/pun/current/gameplay/instantiation and basically replaced using photonnetwork.instantiate with that. I use the code from the link exactly as is. When i load into a room everything works fine at first; the player can walk around and do everything within the "isMine" locked portion of the players code; even though when I look at the player prefab in inspector it says isMine is false and owner is null(both 'controller' and 'creator' get set as me correctly). And then when i specifically click on a child object of the playerprefab in inspector suddenly i cant control the player anymore. so presumably the "isMine" suddenly realizes that is indeed false.

My question is how do i make the owner not null, and make isMine true since I am the creator who instantiated the object? Any help would be appreciated, this has been driving me nuts for 2 days now.

heres a link to the full code: https://pastebin.com/q90FP3zH
the relevant part is basically just the SpawnPlayer() method.

how the photon view looks:
https://imgur.com/gV6BNV1







Comments

  • Tobias
    Options
    Which version of PUN 2 do you use?
    You might want to update to 2.29 when it's out soon. Then check again, if the problem persists. We fixed a few issues with Owner and IsMine values.