Do child realtimeviews not need an owner?
I'm looking at my NormcorePlayer, and the top-level realtimeview has my local client as an owner, but all the child object realtimeviews have no owner.
2 Replies
Hi @Alix Ollivier. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This is correct behavior in Normcore. Child RealtimeViews do not need their own owner when the parent RealtimeView is owned.
According to the Ownership + Lifetime Flags documentation:
Models can have other models as children, and the ownership settings of a parent are enforced on all children. If a model is owned by one client, all other clients are blocked from making changes to the model or any of its child models.The documentation further explains:
You can see this behavior in action with RealtimeViews and RealtimeComponents as they both use models. The RealtimeView's model contains the models for all child RealtimeViews and all RealtimeComponents, so any ownership settings on the RealtimeView apply to child views and to components as well.This is particularly relevant for player prefabs:
Rather than setting ownership of every component on the player, we can set ownership of the root RealtimeView, and the server will block all other clients from making modifications to any RealtimeView or RealtimeComponent model.So in your NormcorePlayer setup, having only the top-level RealtimeView owned by your local client is the intended design. The ownership automatically cascades down to all child RealtimeViews and RealtimeComponents, protecting them from modification by other clients without requiring explicit ownership on each child. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.