Component:SetAssetReference: Difference between revisions

From Resonite Wiki
add info
update to say asset.
 
Line 3: Line 3:
|Name=Set Asset Reference`1
|Name=Set Asset Reference`1
}}
}}
The '''Set Asset Reference''' component is used to store an [[undo]] step for setting a reference field to another reference.
The '''Set Asset Reference''' component is used to store an [[undo]] step for setting a reference field for assets to another asset.


== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Target|'''[[Type:AssetRef`1|AssetRef`1]]<A>'''|TypeAdv0=true| The field that was changed.
|Target|'''[[Type:AssetRef`1|AssetRef`1]]<A>'''|TypeAdv0=true| The field that was changed.
|TargetBefore|{{RootFieldType|AssetRef`1|A}}|TypeAdv1=true| The reference value before the change
|TargetBefore|{{RootFieldType|AssetRef`1|A}}|TypeAdv1=true| The asset value before the change
|TargetAfter|{{RootFieldType|AssetRef`1|A}}|TypeAdv2=true| The reference value after the change.
|TargetAfter|{{RootFieldType|AssetRef`1|A}}|TypeAdv2=true| The asset value after the change.
|_performed|Bool| Whether the undo step was done or undone.
|_performed|Bool| Whether the undo step was done or undone.
|_description|String| The description of the change that was made and what to for the context menu label text when undoing/redoing.
|_description|String| The description of the change that was made and what to for the context menu label text when undoing/redoing.

Latest revision as of 18:56, 6 May 2025

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

The Set Asset Reference component is used to store an undo step for setting a reference field for assets to another asset.

Fields

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. Some components stop their functionality when this field is disabled, but some don't.
Target AssetRef`1<A> The field that was changed.
TargetBefore A The asset value before the change
TargetAfter A The asset value after the change.
_performed Bool Whether the undo step was done or undone.
_description String The description of the change that was made and what to for the context menu label text when undoing/redoing.

Usage

Not used directly by the user.

Examples

See Undo.

See Also