Hello, I’m getting this error when loading scenes that have DDOL Network Objects that destroy themselves once reentering the scene they were created from. How can I fix this? I’m using 2.2 NGO.
Exception: Lobby Manager tried to registered with ScenePlacedObjects which already contains the same GlobalObjectIdHash value 770832492 for Lobby Manager!
First of all, no matter what people on the internet say: any object that is in DDOL should not, never, be destroyed manually.
The proper solution for working with DDOL objects in general is to place them in the very first scene that loads. This scene should be nothing but a container for DDOL objects and it should have a script that loads the next (previously first) scene.
That way the DDOL objects are initialized from the get-go and will never get destroyed except when the app quits. Any coding issues in your own DDOL objects due to this setup need to be fixed by providing the necessary events to reset the DDOL object’s state eg when loading a new scene or when entering a menu scene where they (eg a spawn system) should not perform a task.
Thanks for the advice, and I was able to get it working!