Component:GrabReferenceSet: Difference between revisions

From Resonite Wiki
No edit summary
add some more info
 
Line 3: Line 3:
|Name=Grab Reference Set`1
|Name=Grab Reference Set`1
}}
}}
{{stub}}
The GrabReferenceSet can be used to write a reference to a field on grab and release.  
The GrabReferenceSet can be used to write a reference to a field on grab and release.  


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Target|'''[[Type:SyncRef`1|SyncRef`1]]<T>'''|TypeAdv0=true|
|Target|'''[[Type:SyncRef`1|SyncRef`1]]<T>'''|TypeAdv0=true| The field in which to change on grab and release.
|GrabbedTarget|'''T'''|TypeAdv1=true|
|GrabbedTarget|'''T'''|TypeAdv1=true| The value to set the contained data of the SyncRef referenced in <code>Target</code> when the item is grabbed.
|ReleasedTarget|'''T'''|TypeAdv2=true|
|ReleasedTarget|'''T'''|TypeAdv2=true| The value to set the contained data of the SyncRef referenced in <code>Target</code> when the item is released.
|SetOnGrabbed|Bool|
|SetOnGrabbed|Bool| Whether to set the contained data of the SyncRef referenced in <code>Target</code> when the item is grabbed.
|SetOnReleased|Bool|
|SetOnReleased|Bool| Whether to set the contained data of the SyncRef referenced in <code>Target</code> when the item is released.
}}
}}



Latest revision as of 21:12, 10 May 2024

Component image 
Grab Reference Set`1 component as seen in the Scene Inspector

The GrabReferenceSet can be used to write a reference to a field on grab and release.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
Target SyncRef`1<T> The field in which to change on grab and release.
GrabbedTarget T The value to set the contained data of the SyncRef referenced in Target when the item is grabbed.
ReleasedTarget T The value to set the contained data of the SyncRef referenced in Target when the item is released.
SetOnGrabbed Bool Whether to set the contained data of the SyncRef referenced in Target when the item is grabbed.
SetOnReleased Bool Whether to set the contained data of the SyncRef referenced in Target when the item is released.

Behavior

While on the same slot as a Grabbable the component can be configured to set a reference on grabbed and on released.

Examples

See Also