Component:DynamicVariableSpace: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page DynamicVariableSpace (Component) to Component:DynamicVariableSpace: Creating component Namespace
m You're*
 
(4 intermediate revisions by 4 users not shown)
Line 6: Line 6:
|Name=DynamicVariableSpace
|Name=DynamicVariableSpace
}}
}}
== Intoduction ==
== Intoduction ==
The '''DynamicVariableSpace''' component is used to separate dynamic variables into namespaces.
The '''DynamicVariableSpace''' component is used to separate dynamic variables into namespaces.
Since dynamic variables are, by default, created on the slot of the nearest parent DynamicVariableSpace, this component provides control over where the root of that space is, as well as part of the path name to be referenced when using a consumer of dynamic variables, such as [[DynamicValueVariableDriver`1 (Component) | DynamicValueVariableDriver`1]].
Since dynamic variables are, by default, created on the slot of the nearest parent DynamicVariableSpace, this component provides control over where the root of that space is, as well as part of the path name to be referenced when using a consumer of dynamic variables, such as [[DynamicValueVariableDriver`1 (Component) | DynamicValueVariableDriver`1]]. For more info see [[Dynamic Variables]].
 
{{Note|Having multiple of these components (with the same space name) in the same hierarchy can cause unintended behaviour. If you're having issues with using this component, consider placing this higher in the hierarchy or avoid duplicating a slot that uses this component.|warning}}
 
== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
Line 16: Line 20:
== Behavior ==
== Behavior ==
== Examples ==
== Examples ==
By default worlds have a DynamicVariableSpace named "World" and users have a DynamicVariableSpace named "User"
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:Components{{#translation:}}|DynamicVariableSpace (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Dynamic Variable Space]]
[[Category:Components:Data:Dynamic{{#translation:}}|DynamicVariableSpace (Component){{#translation:}}]]
[[Category:Components:Data:Dynamic{{#translation:}}|Dynamic Variable Space]]

Latest revision as of 22:23, 3 June 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
DynamicVariableSpace component as seen in the Scene Inspector


Intoduction

The DynamicVariableSpace component is used to separate dynamic variables into namespaces. Since dynamic variables are, by default, created on the slot of the nearest parent DynamicVariableSpace, this component provides control over where the root of that space is, as well as part of the path name to be referenced when using a consumer of dynamic variables, such as DynamicValueVariableDriver`1. For more info see Dynamic Variables.

Having multiple of these components (with the same space name) in the same hierarchy can cause unintended behaviour. If you're having issues with using this component, consider placing this higher in the hierarchy or avoid duplicating a slot that uses this component.

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.
SpaceName String The name of the space.
OnlyDirectBinding Bool When enabled, variables won't be bound to this space unless they specify it by name: <spacename>/<varname>.

Behavior

Examples

By default worlds have a DynamicVariableSpace named "World" and users have a DynamicVariableSpace named "User"

Related Components