InstantiateRoomObject only works with Room creator(owner)

Hello,

im using  

PhotonNetwork.InstantiateRoomObject(OnlineRacePrefab.name, StartPos, Quaternion.identity, 0, RaceInitData)

to create an Network object in this room. This works well, but only with the owner of this room.

Any other player in the room can not InstantiateRoomObjects ? (just nothing happend, or function return null.(no error message)

Is this an error or why is this possible?


I discovered that when leaving the room, all rights of the objects created by the owner will be transfered to one of the remaining player in the room. This player can now create Room objects without any problems. (probably because he is the owner of the room now)

When all player leave the room, all network Object gets destroyed.

Any help or what to do that all player in a room can create Network objects wich persist, when the player leaves the room.

Best reagrds

Matthias

Best Answer

  • Tobias
    Tobias admin
    edited January 28 Answer ✓

    It's by design. The creator of scene objects has to assign a ViewID for the networked object and this is tricky to do in a distributed way.

    Anyone can send a message to the creator of the room to create some object on their behalf.

    This is a PUN / Photon Unity Networking question. Please post in the relevant forum.

Answers

  • Tobias
    Tobias admin
    edited January 28 Answer ✓

    It's by design. The creator of scene objects has to assign a ViewID for the networked object and this is tricky to do in a distributed way.

    Anyone can send a message to the creator of the room to create some object on their behalf.

    This is a PUN / Photon Unity Networking question. Please post in the relevant forum.