Class SyncBehaviour
Abstract class with helper methods for synchronization.
You can extend this class to implement synchronization classes.
Namespace: black.kit.toybox
Assembly: cs.temp.dll.dll
Syntax
public abstract class SyncBehaviour : UdonSharpBehaviour
Fields
NAME_SUBJECT
The property name of the Subject component.
Declaration
public const string NAME_SUBJECT = "subject"
Field Value
Type | Description |
---|---|
System.String |
Properties
Initialized
The flag that indicates whether the object is initialized.
Declaration
protected bool Initialized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ChangeOwner()
Change the object owner to the local player.
Declaration
public virtual void ChangeOwner()
Initialize()
Implement to initialize the view.
Declaration
protected abstract void Initialize()
IsOwner()
Determines if the local player is the owner.
Declaration
public virtual bool IsOwner()
Returns
Type | Description |
---|---|
System.Boolean | True if the local player is the owner |
OnDeserialization()
The callback when completed to synchronize.
Declaration
public override void OnDeserialization()
OnEnable()
Update the view when the component is enabled.
Declaration
protected virtual void OnEnable()
OnPlayerJoined(VRCPlayerApi)
The callback when a player joins.
Declaration
public override void OnPlayerJoined(VRCPlayerApi player)
Parameters
Type | Name | Description |
---|---|---|
VRCPlayerApi | player | The player who joined |
Sync()
Starts the syncing.
Declaration
public virtual void Sync()
UpdateView()
Implement to update the view.
Declaration
protected abstract void UpdateView()
Remarks
The OnDeserialization method cannot be called explicitly. Therefore, instead, override this method to update the view.