photon view id duplicate

Options
Hi there,
I have 2 scenes, a menu scene and a game play scene. In both scenes I have a couple of objects that use the Photon View component as it's needed for some RPC calls. One of the objects in the menu scene has a "dont destroy on load call" so it persists through scene change. When I move from the menu scene to the game play scene, I get the "photon view id duplicate" because both the object that persists and one of the objects already existing in my game play scene share the same Photon View ID 2.

I tried to go in my game play scene and manually change the Photon View ID for the objects that already exist there but it's not working, it gets defaulted back as soon as I try to apply the changes to the prefab. I read somewhere that PunSceneSettingsFile might be of help, but I'm not sure what to do with it.

My question is, how can I change the Photon View ID manually inside the scene and if I can't, what else can I do?
Thanks!

Comments

  • stefanplc
    Options
    I ended up finding another thread which suggested that objects that persist through scenes shouldn't use the Photon View component so I adjusted my code accordingly and everything is now fine. Thanks!