Component:SettingValueSync: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info. also this component is absolutely based and epic
Line 3: Line 3:
|Name=Setting Value Sync`2
|Name=Setting Value Sync`2
}}
}}
{{stub}}
The '''SettingValueSync''' component allows for reading (And sometimes writing) a setting from a particular <code>SyncingUser</code> for the purpose of changing an item/world's appearance or behavior depending on that settings value.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|SyncingUser|{{RootFieldType|UserRef}}|TypeAdv0=true|
|SyncingUser|{{RootFieldType|UserRef}}|TypeAdv0=true| The user to get the setting from.
|SettingName|String|
|SettingName|String| The setting or setting group to get a value for. This is a path separated by ".".
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv2=true|
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv2=true| The field to put the setting value into, can also write back to the setting if the world is unsafe or the setting allows for the world to write it.
|SubsettingGetter|String|
|SubsettingGetter|String| The subsetting method name to use to get a subsetting.
|SubsettingKey|String|
|SubsettingKey|String| The key to pass to the subsetting getter method found under the name specified by <code>SubsettingGetter</code> in order to get a subsetting.
}}
}}


== Behavior ==
== Usage ==
Attach to a slot and provide a setting path (<code>SettingName</code>) and a <code>SyncingUser</code> to read from in order to read values. For subsettings like audio devices or trackers a <code>SubsettingGetter</code> and a <code>SubsettingKey</code> is needed.


== Examples ==
== Examples ==
Can be used to make an item/avatar/world inform the user that an item won't look correct, or will behave differently depending on that user's settings.


== See Also ==
== See Also ==
* [[Settings]]


[[Category:Components:Utility{{#translation:}}|Setting Value Sync`2]]
[[Category:Components:Utility{{#translation:}}|Setting Value Sync`2]]
[[Category:Components{{#translation:}}|Setting Value Sync`2]]
[[Category:Components{{#translation:}}|Setting Value Sync`2]]
[[Category:Generic Components{{#translation:}}|Setting Value Sync`2]]
[[Category:Generic Components{{#translation:}}|Setting Value Sync`2]]
[[Category:ComponentStubs]]

Revision as of 19:03, 2 February 2025

Component image 
File:SettingValueSync`2Component.png
Setting Value Sync`2 component as seen in the Scene Inspector

The SettingValueSync component allows for reading (And sometimes writing) a setting from a particular SyncingUser for the purpose of changing an item/world's appearance or behavior depending on that settings value.

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.
SyncingUser direct UserRef The user to get the setting from.
SettingName String The setting or setting group to get a value for. This is a path separated by ".".
TargetField field drive of T The field to put the setting value into, can also write back to the setting if the world is unsafe or the setting allows for the world to write it.
SubsettingGetter String The subsetting method name to use to get a subsetting.
SubsettingKey String The key to pass to the subsetting getter method found under the name specified by SubsettingGetter in order to get a subsetting.

Usage

Attach to a slot and provide a setting path (SettingName) and a SyncingUser to read from in order to read values. For subsettings like audio devices or trackers a SubsettingGetter and a SubsettingKey is needed.

Examples

Can be used to make an item/avatar/world inform the user that an item won't look correct, or will behave differently depending on that user's settings.

See Also