Write Or Create Dynamic Variable is a ProtoFlux node that is able to create or find previously created dynamic variables under a slot. For more info on Dynamic Variables, see Dynamic Variables. This node will only attach the variable if Path
were to be used on the slot it's attaching to would be able to bind. Otherwise the dynamic variable will not be created and it will impulse OnFailed
.
Inputs
Target (Slot)
The slot to search for a dynamic variable space from to put the variable into
Path (String)
The path for the created dynamic variable. To see how this influences attaching see the paragraph at the beginning of this page.
CreateDirectlyOnTarget (bool)
Whether to attach the new dynamic variable when created to the slot the dynamic variable space is on (false) or directly on the slot specified on Target
(true)
FindExisting (Bool)
If true, this will not create the dynamic variable component if there is already another component of the same path and type that can be read from at the given Target
Value (Generic)
Any type of value, reference, or object that the variable should store.
See also: #1254
Outputs
OnFound (Continuation)
Fires when *
is fired and FindExisting
is true and a variable already exists that can be read through Target
OnCreated (Continuation)
Fires when *
is fired and a variable has been created because either FindExisting
was false, or the variable didn't exist before. This will only create the variable if it can bind, which is explained on the Dynamic Variables page.
OnFailed (Continuation)
Fires when *
is fired and the variable would not able to bind when created at Target
. The variable was not created when this impulses.