The '''CloudValueVariableDriver<T>''' component drives the <code>Target</code> [[field]] of type '''T''' with the value of the specified [[cloud variable]] owned by the local user.
<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Path|String|
|Path|String| The [[Cloud_Variables#Cloud_Variable_Definition| path]] of the variable this component will read.
|Target|IField`1|TypeString1=IField<float>|
|Target|{{RootFieldType|FieldDrive`1|T}}|TypeAdv1=true| The target [[Type:IField`1| field]] to which the variable value will be written.
|IsLinkedToCloud|Bool|
|IsLinkedToCloud|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| ''(Read Only)'' Indicates whether this field was successfully bound to the target variable.
|WriteBack|Bool|
|WriteBack|Bool| Updates the value in the cloud when the driven field is changed. See [[Drives#Write Backs|write backs]].
|FallbackValue|Float|
|FallbackValue|'''T'''|TypeAdv4=true| Default value if the local user does not have a definition for the cloud variable or the local user does not match <code>OverrideOwner</code>.
|OverrideOwner|String|
|OverrideOwner|String| The UserID of the user that made a definition for the variable specified by <code>Path</code> or the local user if not specified.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Upon being given a valid cloud variable <code>Path</code>, the component will drive the value of the <code>Target</code> with the value of the cloud variable owned by the local user. If <code>OverrideOwner</code> is specified, the field will only be driven to the value for the user specified in <code>OverrideOwner</code>. Otherwise, the field will take the value of the <code>FallbackValue</code>.
<!--T:4-->
<!--T:4-->
Line 26:
Line 28:
<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
* [[Cloud Variables]]
* [[Component:CloudValueVariable]]
* [[Component:CloudValueField]]
* [[Component:ActiveUserCloudField]]
* [[Component:ActiveUserCloudValueVariable]]
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Cloud Value Variable Driver`1]]
[[Category:Components{{#translation:}}|Cloud Value Variable Driver`1]]
[[Category:Generic Components{{#translation:}}|Cloud Value Variable Driver`1]]
[[Category:Components:Cloud:Variables{{#translation:}}|Cloud Value Variable Driver`1]]
[[Category:Components:Cloud:Variables{{#translation:}}|Cloud Value Variable Driver`1]]
Latest revision as of 22:28, 16 March 2025
Component image
CloudValueVariableDriver<T> component as seen in the Scene Inspector
The CloudValueVariableDriver<T> component drives the Targetfield of type T with the value of the specified cloud variable owned by the local user.
The UserID of the user that made a definition for the variable specified by Path or the local user if not specified.
Usage
Upon being given a valid cloud variable Path, the component will drive the value of the Target with the value of the cloud variable owned by the local user. If OverrideOwner is specified, the field will only be driven to the value for the user specified in OverrideOwner. Otherwise, the field will take the value of the FallbackValue.