IRealtimeComponent
IRealtimeComponent
An object that represents a RealtimeComponent. Typically this is a RealtimeView or anything that subclasses RealtimeComponent<TModel>.
Properties
RealtimeView realtimeView { get; }
The RealtimeView that owns this component. Accessing this property before Start is unreliable.
Realtime realtime { get; }
The Realtime instance that is managing this component. On prefab views, this property is available after Awake. On scene views or their children, this is not available until Start.
Room room { get; }
The current room of the Realtime instance that is managing this component. This might be null if the Realtime instance hasn't connected yet. Accessing this property before Start is unreliable.
int ownerIDSelf { get; }
The client ID of the component owner.
int ownerIDInHierarchy { get; }
The client ID of the component's hierarchy owner (the root owner of the component).
bool isUnownedSelf { get; }
True if the component is not owned by any client.
bool isUnownedInHierarchy { get; }
True if the component and all of its parent views are not owned by any client.
bool isOwnedLocallySelf { get; }
True if the component is owned by the local client.
bool isOwnedLocallyInHierarchy { get; }
True if the component and all of its parent views are owned by the local client.
bool isOwnedRemotelySelf { get; }
True if the component is owned by a remote client.
bool isOwnedRemotelyInHierarchy { get; }
True if this component and all of its parent views are owned by a remote client.
Methods
void RequestOwnership()
Request ownership of the component.
void SetOwnership(int clientID)
Set ownership of the component.
void ClearOwnership()
Clear ownership of the component.