MasterOX 水
MasterOX 水3w ago

request ownership

i forgot how to request ownership can u please tell me
3 Replies
kapa.ai
kapa.ai3w ago
Hi @MasterOX 水. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- In NormalVR, you can request ownership of a component or model using the RequestOwnership() method. This method is available for RealtimeComponent, RealtimeModel, and RealtimeView classes. Here's an example of how to request ownership of a RealtimeTransform component:
// Get the RealtimeTransform component
RealtimeTransform realtimeTransform = myObject.GetComponent<RealtimeTransform>();

// Request Ownership
realtimeTransform.RequestOwnership();
// Get the RealtimeTransform component
RealtimeTransform realtimeTransform = myObject.GetComponent<RealtimeTransform>();

// Request Ownership
realtimeTransform.RequestOwnership();
(Source: normcore.io (https://normcore.io/documentation/room/ownership-and-lifetime-flags#requesting-ownership-of-any-realtimecomponent-or-realtimemodel)) You can also request ownership immediately when instantiating a new object using the ownedByClient field of Realtime.Instantiate():
GameObject myObject = Realtime.Instantiate("My Object", ownedByClient: true);
GameObject myObject = Realtime.Instantiate("My Object", ownedByClient: true);
(Source: normcore.io (https://normcore.io/documentation/room/ownership-and-lifetime-flags#realtimeinstantiate--ownedbyclient)) If you're debugging at runtime, the RealtimeView inspector in Unity includes Request Ownership and Clear Ownership buttons that function like calling RequestOwnership() or ClearOwnership() in code. (Source: normcore.io (https://normcore.io/documentation/room/ownership-and-lifetime-flags#at-runtime-with-the-unity-inspector)) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@758040514678489279> kapa.ai is still learning and improving, please let us know how it did by reacting below
MasterOX 水
MasterOX 水3w ago
thank you
More Posts
Cannot build after upgrading to Normcore 2.10.2Hi, Today I upgradet Normcore from 2.9.5 to 2.10.2, but, after upgrading, I get the following errorHow to I change the room name in gameI want to make a lobby and then entering a code changes to that room. How would I do this? I cant fiUnable to build with "Development Build" flag in 2.10.2We went from 2.9.3 => 2.10.2 and we stopped being able to build with the "Development Build" flag tuMoving a kinematic body with .MovePosition() sometimes doesn't update the position for all playersI've been experiencing strange results with moving rigidbodies with my own velocity calculation usinCustom update rate for far away modelsWe have a large scene that has many RealtimeTransforms throughout it, including avatars. We would loRealtimeAvatarVoice not creating AudioOutput component for remote clients sometimesOccasionally, during a scene transition, clients can no longer hear one or more remote clients. Whil'Networking.NetworkSpawnerModel' is missing the class attributeI'm receiving the following exception after compile: 'Networking.NetworkSpawnerModel' is missing tRealtimeDictionary eventsif a RealtimeDictionary is set directly, will the modelReplaced event fire? For example: ```model.fRealtimeComponent connectedhow do I know when a RealtimeComponent is initialized and connected to the network?are all properties on a model updated at the same time?if I update multiple properties on a model at the same time on the same frame, will they sync to cli