Component:GlobalValue: Difference between revisions

From Resonite Wiki
add info
overhaul information
Line 3: Line 3:
|Name=Global Value`1
|Name=Global Value`1
}}
}}
The '''GlobalValue''' component is used by protoflux internally to manage global values.
 
The '''GlobalValue''' component is used by [[ProtoFlux]] to provide [[globals]] to a node group.


== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Value|'''T'''|TypeAdv0=true| The value to point to for a Protoflux context.
|Value|'''T'''|TypeAdv0=true| The value to point to for a Protoflux context.
Line 11: Line 13:


== Usage ==
== Usage ==
Just don't.  
 
When not using ProtoFlux, This component has no use over more idiomatic components such as a [[Component:ValueField|ValueField]].
 
When using ProtoFlux, the underlying value can be changed and any node that accepts a global input that references the component will update during execution. This can allow one to dynamically change things like [[dynamic impulse]] tags.
 
This component can also simply be used for static global values that need to be referenced in a lot of places for when the overhead of [[dynamic variables]] is undesirable. When combined with the [[ProtoFlux:Global To Output|Global To Output]] node, this component also provides more UX than sourcing a ValueField by being able to see the underlying value directly.


== See Also ==
== See Also ==
* [[Component:GlobalReference]]
* [[ProtoFlux:Global To Output]]
* [[ProtoFlux:Write Global]]


[[Category:Components:ProtoFlux{{#translation:}}|Global Value`1]]
[[Category:Components:ProtoFlux{{#translation:}}|Global Value`1]]
[[Category:Components{{#translation:}}|Global Value`1]]
[[Category:Components{{#translation:}}|Global Value`1]]
[[Category:Generic Components{{#translation:}}|Global Value`1]]
[[Category:Generic Components{{#translation:}}|Global Value`1]]

Revision as of 14:07, 9 April 2025

Component image 
File:GlobalValue`1Component.png
Global Value`1 component as seen in the Scene Inspector

The GlobalValue component is used by ProtoFlux to provide globals to a node group.

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.
Value T The value to point to for a Protoflux context.

Usage

When not using ProtoFlux, This component has no use over more idiomatic components such as a ValueField.

When using ProtoFlux, the underlying value can be changed and any node that accepts a global input that references the component will update during execution. This can allow one to dynamically change things like dynamic impulse tags.

This component can also simply be used for static global values that need to be referenced in a lot of places for when the overhead of dynamic variables is undesirable. When combined with the Global To Output node, this component also provides more UX than sourcing a ValueField by being able to see the underlying value directly.

See Also