Andrei Vaduva
Andrei Vaduva2mo ago

Can i set RealtimeView's scene view UUID?

I have a use case where i need to set the scene view UUID because i'm using normcore in 2 different apps. Is this possible?
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @Andrei Vaduva. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The Scene View UUID for a RealtimeView in Normcore is automatically assigned and is used to synchronize the view's model in the datastore across multiple clients. It appears on RealtimeViews that are in the scene and is a globally unique identifier. Once two clients connect to a room, they use this identifier to ensure that both instances of the same RealtimeView share the same model. After this, the scene view UUID is not used again source (https://normcore.io/documentation/realtime/realtimeview#editor-interface). However, Normcore does not use UUIDs to synchronize views internally. If you want to introduce this functionality, you can create a RealtimeComponent that assigns a UUID in OnRealtimeModelReplaced() when getting a fresh model. This will ensure that the component has a unique UUID and that existing models don’t have their UUIDs reassigned by new clients source (https://normcore.io/documentation/realtime/common-questions#is-there-a-uuid-that-i-can-use-to-find-a-realtimeview-reference-at-runtime). If you end up with a duplicate Scene View UUID (for example, if you save a copy of a scene and expect to additively load it at runtime), you can use the “Reset View UUID” button to tell Normcore to reset it. But be careful, once reset, this view will not be able to communicate with scene views that had the old ID. It will also not be able to retrieve persistent data stored under the previous Scene View UUID source (https://normcore.io/documentation/realtime/realtimeview#reset-view-uuid). So, while you can't directly set the Scene View UUID, you can manipulate it through the methods provided by Normcore. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@1217086475661738045> kapa.ai is still learning and improving, please let us know how it did by reacting below
Andrei Vaduva
Andrei Vaduva2mo ago
if anybody needs this, i opened the scene with a text editor and changed it there directly
maxweisel
maxweisel2mo ago
You can also use the Debug inspector in Unity to edit them, but I would generally advise against using the same scene view UUID in two projects that aren’t sharing the same scene file. Doing so will require you to get the entire RealtimeView and component hierarchy perfectly in sync which is difficult and if not done correctly can result in hard to debug issues at runtime.