Component:ActiveUserCloudValueVariable: Difference between revisions

From Resonite Wiki
give info for component
move from `1
Tag: Removed redirect
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
ActiveUserCloudValueVariable is a component that reads a cloud variable for the active user and puts the value into Value, which can be any primitive type. This node follows the same rules as [[Cloud Variables]] except that it caches the quickly made changes and then updates the cloud variable with the cached changes as soon as possible using the cloud.
{{Infobox Component
{{Infobox Component
|Image=ActiveUserCloudValueVariable`1Component.png
|Image=ActiveUserCloudValueVariable`1Component.png
|Name=Active User Cloud Value Variable`1
|Name=Active User Cloud Value Variable<T>
}}
}}
The '''ActiveUserCloudValueVariable''' component provides a field that is synced to a cloud variable, with the user it is parented under being the owner of the value. This node follows the same rules as [[Cloud Variables]] except that it caches the quickly made changes and then updates the cloud variable with the cached changes as soon as possible using the cloud.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Path|String| The path of the variable. Following the rules of [[Cloud Variables]].
|Path|String| The [[Cloud_Variables#Cloud_Variable_Definition| path]] of the variable this component will read, for the current [[Active_User|active user]]
|IsLinkedToCloud|Bool| Whether or not the cloud variable has been successfully connected to and is relaying information properly.
|IsLinkedToCloud|Bool| ''(Read Only)'' Indicates whether this field was successfully bound to the target variable.
|UpdateCloudVariable|Bool| Whether or not to update the cloud variable value for the active user when Value is changed.
|UpdateCloudVariable|Bool| Indicates that this variable should update the value in the cloud when it is written or driven to a different value.
|FallbackValue|Float| The default value defined by who made the variable.
|FallbackValue|'''T'''|TypeAdv3=true| Default value if there is no current active user. If the active user's value isn't set, the definition default will be used instead.
|Value|Float| the value the active user has set for the cloud variable.
|Value|'''T'''|TypeAdv4=true| The value from the cloud variable.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
 
To use this component, simply add it to a slot underneath a user's hierarchy and set the <code>Path</code> to the path of a cloud variable. (make sure that the variable and component are of the same type!)
Having an item where it changes to the user's color set on the cloud.
The component's <code>Value</code> field will then be filled with the value from the cloud variable.


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
 
Having an item where it changes to the user's color set on the cloud.
{{Stub}}


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
* [[Component:ActiveUserCloudField]]
</translate>
</translate>
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Active User Cloud Value Variable`1]]
[[Category:Components{{#translation:}}|Active User Cloud Value Variable`1]]
[[Category:Generic Components{{#translation:}}|Active User Cloud Value Variable`1]]
[[Category:Components:Cloud:Variables{{#translation:}}|Active User Cloud Value Variable`1]]
[[Category:Components:Cloud:Variables{{#translation:}}|Active User Cloud Value Variable`1]]

Latest revision as of 11:25, 11 November 2024

Component image 
Active User Cloud Value Variable<T> component as seen in the Scene Inspector


The ActiveUserCloudValueVariable component provides a field that is synced to a cloud variable, with the user it is parented under being the owner of the value. This node follows the same rules as Cloud Variables except that it caches the quickly made changes and then updates the cloud variable with the cached changes as soon as possible using the cloud.

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.
Path String The path of the variable this component will read, for the current active user
IsLinkedToCloud Bool (Read Only) Indicates whether this field was successfully bound to the target variable.
UpdateCloudVariable Bool Indicates that this variable should update the value in the cloud when it is written or driven to a different value.
FallbackValue T Default value if there is no current active user. If the active user's value isn't set, the definition default will be used instead.
Value T The value from the cloud variable.

Usage

To use this component, simply add it to a slot underneath a user's hierarchy and set the Path to the path of a cloud variable. (make sure that the variable and component are of the same type!) The component's Value field will then be filled with the value from the cloud variable.

Examples

Having an item where it changes to the user's color set on the cloud.

See Also