Skip to content

Class Manus::Networking::Sync::BaseSync

ClassList > Manus > Networking > Sync > BaseSync

This is the Base Class of the Syncs. All these functions are expected to be implemented by the Sync classes.

Inherits the following classes: MonoBehaviour

Inherited by the following classes: Manus::Networking::Sync::ActivenessSync, Manus::Networking::Sync::ChatSync, Manus::Networking::Sync::GrabbableObjectSync, Manus::Networking::Sync::HandGrabSync, Manus::Networking::Sync::SkeletonSync, Manus::Networking::Sync::TransformSync, Manus::Networking::Sync::WorldTransformSync

Public Functions

Type Name
void Clean ()
The function called when a Syncable needs to be cleaned. This function should make the IsDirty return false.
void Initialize (NetObject p_Object)
The function called when a NetObject is Initialized.
bool IsDirty ()
The function called to see if a Syncable is dirty. Returns true if it need to be Synced.
virtual void OnGainOwnership (NetObject p_Object)
Called when this game instance gets control of the NetObject.
virtual void OnLoseOwnership (NetObject p_Object)
Called when this game instance loses control of the NetObject.
void ReceiveData (LidNet.NetBuffer p_Msg)
Receives all information that needs to be synced.
void WriteData (LidNet.NetBuffer p_Msg)
Writes all information that needs to be synced.

Public Functions Documentation

function Clean

void Manus::Networking::Sync::BaseSync::Clean () 

function Initialize

The function called when a NetObject is Initialized.

void Manus::Networking::Sync::BaseSync::Initialize (
    NetObject p_Object
) 

Parameters:

  • p_Object The Net Object this Sync belongs to.

function IsDirty

The function called to see if a Syncable is dirty. Returns true if it need to be Synced.

bool Manus::Networking::Sync::BaseSync::IsDirty () 

Returns:

Returns true if it need to be Synced.

function OnGainOwnership

Called when this game instance gets control of the NetObject.

inline virtual void Manus::Networking::Sync::BaseSync::OnGainOwnership (
    NetObject p_Object
) 

Parameters:

  • p_Object The NetObject this game instance gets control of.

function OnLoseOwnership

Called when this game instance loses control of the NetObject.

inline virtual void Manus::Networking::Sync::BaseSync::OnLoseOwnership (
    NetObject p_Object
) 

Parameters:

  • p_Object The NetObject this game instance loses control of.

function ReceiveData

Receives all information that needs to be synced.

void Manus::Networking::Sync::BaseSync::ReceiveData (
    LidNet.NetBuffer p_Msg
) 

Parameters:

  • p_Msg The buffer to read the data from

function WriteData

Writes all information that needs to be synced.

void Manus::Networking::Sync::BaseSync::WriteData (
    LidNet.NetBuffer p_Msg
) 

Parameters:

  • p_Msg The buffer to write the data to

The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Sync/BaseSync.cs