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! Your search result can be found below. Plus, we offer support via these channels:

Try Our

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.

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.

Photon Network : InstantiateRoomObject vs InstantiateSceneObject

2021-12-24 07:20:24

Im making a game lets says like Co-op Pacman, where the score is Accumulated from each player, like if Player A eat 10 and Player B eat 7, the scoreboard would be 17 (10+7).

so in order to make this share scoreboard, i want to make a Neutral Object where every player can access it simultaneously, and player who just join get automatically synch with the scoreboard.

and i look at some of the PUN features and this features might solve my problem



i already see this documentation and idk what would be the best for my scenario

so how it works? and how it used for each features?

all i can imagine that the Object that instantiate is owned by MasterClient, so all i can think is that in order to other player who are not Master to access this Object is by RPC that targeted to Master, but if im doing that, what is the difference with PhotonNetwork.Instantiate? if it is the object get deleted when the player who owned it is quit, i could just RoomOptions.CleanupCacheOnLeave = false and the object would still be there if the owner quit.


2021-12-24 10:20:09

Hi @anwpecirotan,

Thank you for choosing Photon!

InstantiateSceneObject is the old name of InstantiateRoomObject.

The difference in naming, current state:

scene object is a type of room object.

room object is not owned by any player and controller by current master client (if any).

scene object is not runtime instantiated, it's a GameObject already in the scene with a PhotonView attached to it. You don't call Instantiate for scene objects.

Back to top