Skip to content

Class Manus::Networking::Sync::GrabbableObjectSync

ClassList > Manus > Networking > Sync > GrabbableObjectSync

This component syncs the necessary Hand information between the server and clients.

Inherits the following classes: Manus::Networking::Sync::BaseSync, Manus::Interaction::IGrabbable

Public Functions

Type Name
override void Clean ()
The function called when a Syncable needs to be cleaned. This function should make the IsDirty return false.
override void Initialize (NetObject p_Object)
The function called when a NetObject is Initialized.
override bool IsDirty ()
The function called to see if a Syncable is dirty. Returns true if it need to be Synced.
void OnAddedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info)
Called when a new grabber starts grabbing this.
virtual override void OnGainOwnership (NetObject p_Object)
Called when this game instance gets control of the NetObject.
void OnGrabbableObjectSyncMessage (bool p_Grab, LidNet.NetBuffer p_Msg)
This message is received when another player requests a grab.
void OnGrabbedEnd (GrabbedObject p_Object)
Called when this stops being grabbed.
void OnGrabbedFixedUpdate (GrabbedObject p_Object)
Called every FixedUpdate when this is grabbed.
void OnGrabbedHandPose (InteractionHand p_Object, GrabbedObject.Info p_Info)
Poses the visual hand. (If needed)
void OnGrabbedStart (GrabbedObject p_Object)
Called when this starts getting grabbed.
virtual override void OnLoseOwnership (NetObject p_Object)
Called when this game instance loses control of the NetObject.
void OnRemovedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info)
Called when a grabber stops grabbing this.
override void ReceiveData (LidNet.NetBuffer p_Msg)
Receives all information that needs to be synced.
override void WriteData (LidNet.NetBuffer p_Msg)
Writes all information that needs to be synced.

Public Functions inherited from Manus::Networking::Sync::BaseSync

See Manus::Networking::Sync::BaseSync

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 inherited from Manus::Interaction::IGrabbable

See Manus::Interaction::IGrabbable

Type Name
void OnAddedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info)
Called when a new grabber starts grabbing this.
void OnGrabbedEnd (GrabbedObject p_Object)
Called when this stops being grabbed.
void OnGrabbedFixedUpdate (GrabbedObject p_Object)
Called every FixedUpdate when this is grabbed.
void OnGrabbedHandPose (InteractionHand p_Object, GrabbedObject.Info p_Info)
Poses the visual hand. (If needed)
void OnGrabbedStart (GrabbedObject p_Object)
Called when this starts getting grabbed.
void OnRemovedInteractingInfo (GrabbedObject p_Object, GrabbedObject.Info p_Info)
Called when a grabber stops grabbing this.

Public Functions Documentation

function Clean

inline override void Manus::Networking::Sync::GrabbableObjectSync::Clean () 

function Initialize

The function called when a NetObject is Initialized.

inline override void Manus::Networking::Sync::GrabbableObjectSync::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.

inline override bool Manus::Networking::Sync::GrabbableObjectSync::IsDirty () 

Returns:

Returns true if it need to be Synced.

function OnAddedInteractingInfo

Called when a new grabber starts grabbing this.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnAddedInteractingInfo (
    GrabbedObject p_Object,
    GrabbedObject.Info p_Info
) 

Parameters:

  • p_Object Contains information about the grab
  • p_Info Contains information about the added grabber

Implements Manus::Interaction::IGrabbable::OnAddedInteractingInfo

function OnGainOwnership

Called when this game instance gets control of the NetObject.

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

Parameters:

  • p_Object The NetObject this game instance gets control of.

Implements Manus::Networking::Sync::BaseSync::OnGainOwnership

function OnGrabbableObjectSyncMessage

This message is received when another player requests a grab.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnGrabbableObjectSyncMessage (
    bool p_Grab,
    LidNet.NetBuffer p_Msg
) 

Parameters:

  • p_Grab To grab or not to grab
  • p_Msg The NetBuffer containing information on the grab

function OnGrabbedEnd

Called when this stops being grabbed.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnGrabbedEnd (
    GrabbedObject p_Object
) 

Parameters:

  • p_Object Contains information about the grab

Implements Manus::Interaction::IGrabbable::OnGrabbedEnd

function OnGrabbedFixedUpdate

Called every FixedUpdate when this is grabbed.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnGrabbedFixedUpdate (
    GrabbedObject p_Object
) 

Parameters:

  • p_Object Contains information about the grab

Implements Manus::Interaction::IGrabbable::OnGrabbedFixedUpdate

function OnGrabbedHandPose

Poses the visual hand. (If needed)

inline void Manus::Networking::Sync::GrabbableObjectSync::OnGrabbedHandPose (
    InteractionHand p_Object,
    GrabbedObject.Info p_Info
) 

Parameters:

  • p_Object

Implements Manus::Interaction::IGrabbable::OnGrabbedHandPose

function OnGrabbedStart

Called when this starts getting grabbed.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnGrabbedStart (
    GrabbedObject p_Object
) 

Parameters:

  • p_Object Contains information about the grab

Implements Manus::Interaction::IGrabbable::OnGrabbedStart

function OnLoseOwnership

Called when this game instance loses control of the NetObject.

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

Parameters:

  • p_Object The NetObject this game instance loses control of.

Implements Manus::Networking::Sync::BaseSync::OnLoseOwnership

function OnRemovedInteractingInfo

Called when a grabber stops grabbing this.

inline void Manus::Networking::Sync::GrabbableObjectSync::OnRemovedInteractingInfo (
    GrabbedObject p_Object,
    GrabbedObject.Info p_Info
) 

Parameters:

  • p_Object Contains information about the grab
  • p_Info Contains information about the removed grabber

Implements Manus::Interaction::IGrabbable::OnRemovedInteractingInfo

function ReceiveData

Receives all information that needs to be synced.

inline override void Manus::Networking::Sync::GrabbableObjectSync::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.

inline override void Manus::Networking::Sync::GrabbableObjectSync::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/GrabbableObjectSync.cs