Niv
Niv
NNormal
Created by Niv on 2/18/2025 in #🤝ask-a-question
Mixing ownership within a single prefab
I'd like to have mixed ownership within a single Realtime.Instantiate() prefab. Basically it is made of two parts: 1st part is always owned by the client that created it 2nd part starts ownerd by the creating client but later other clients can request ownership of that part From the docs it seems like you cannot take ownership of a realtimeView and its components if the parent view is owned by another client. Does that mean I need to put a root RealtimeView with no RealtimeComponents on it that will remain unOwned so I can request ownership of the parts mentioned above? Any other design pattern offered for mixed ownership?
7 replies
NNormal
Created by Niv on 7/17/2024 in #🤝ask-a-question
Is there a callback when *any* property of a model changes?
In my RealtimeComponent, I have a relatively big model with several properties, is there a way to get a callback when any property changes instead of creating a didChange callback to every property and subscribing/unsubscribing to it?
14 replies
NNormal
Created by Niv on 7/7/2024 in #🤝ask-a-question
is the ReltimeView property 'preventOwnershipTakeover' synched between the clients?
Meaning, if clientA takes ownership and the sets the 'preventOwnershipTakeover' property to true - will client 'B' observe that property to be true on his end? If it is not synchronized and assuming we have a rigidbody with a RealtimeTransform component that clientA prevented ownership changes on - what would prevent client B from requesting ownership on that rigidbody (and immediately receiving it), only for it to be rolled back by the server. This process can happen again and again over multiple frames (as the rigidbody keeps colliding with clientB owned rigidbodies - creating an unnecessarily janky behavior of that rigidbody.
18 replies