cryptomax
cryptomax2mo ago

Enabling Gameobject with realtime view on it

If I have a game obejct that is off when the scene loads, and that game obejct has a realtime view and custom component on it, will the realtime view properly register with the realtime when I enable the game obejct?
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @cryptomax. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- No, if a GameObject with a RealtimeView is disabled when the scene loads, it will not register with Realtime when you enable the GameObject. This is because RealtimeViews register with Realtime in the Start() method, and if they are disabled, they will never register. Realtime will neither initialize them nor connect them to the datastore. Instead, you can use a custom RealtimeComponent to enable/disable child game objects, scripts, or renderers directly. This way, the RealtimeView can still register with Realtime even if the GameObject it's attached to is initially disabled. Source: Can I disable RealtimeView? (https://normcore.io/documentation/realtime/common-questions#can-i-disable-realtimeview) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@401986039964631060> kapa.ai is still learning and improving, please let us know how it did by reacting below
maxweisel
maxweisel2mo ago
This is incorrect, when you eventually enable the view it will register and start syncing I generally don’t recommend this approach, but it will work. Instead it’s worth trying to disable renderers and components rather than the whole game object