Component:DynamicReferenceVariableReset

From Resonite Wiki
Revision as of 16:48, 19 March 2024 by 989onan (talk | contribs) (add info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Dynamic Reference Variable Reset is a component that will reset the value for a Dynamic Variable to a specified Reference. This is useful for when you are messing with an item, but you want the values for it to clear themselves with it is saved, loaded, or duplicated. The variable space is determined by the searching algorithm explained on Dynamic Variables page from the slot this is on.

Component image 
Dynamic Reference Variable Reset`1 component as seen in the Scene Inspector


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.
VariableName String The Variable name that will be used to link this component's refrenced value to the Dynamic Variables System.
ResetOnLoad Bool Reset when this component is loaded with a world.
ResetOnDuplicate Bool Reset when the object this is under is duplicated.
ResetOnPaste Bool Reset when the object this is under is pasted from clipboard.
ResetTarget T The reference value to reset to when any of the enabled reset events occur.

Usage

Examples

If you use this component with a slot selector, you can make the selection go null when the object is loaded or loaded with a world. This can be useful for something like a teleporter system or something, where you want the user to select where they want to go when the world loads, rather than being left at the last value it was at when the world was saved.

Related Components