(4 intermediate revisions by one other user not shown)
Line 14:
Line 14:
|Default|'''T'''|TypeAdv1=true| The content of this value will be inside of <code>Target</code> for every user locally unless otherwise specified by an [[#Override|Override]] inside of the <code>_overrides</code> bag.
|Default|'''T'''|TypeAdv1=true| The content of this value will be inside of <code>Target</code> for every user locally unless otherwise specified by an [[#Override|Override]] inside of the <code>_overrides</code> bag.
|CreateOverrideOnWrite|Bool| When flux or any other means tries to set the value of target from someone's machine, create an [[#Override|Override]] for them in <code>_overrides</code> bag.
|CreateOverrideOnWrite|Bool| When flux or any other means tries to set the value of target from someone's machine, create an [[#Override|Override]] for them in <code>_overrides</code> bag.
|PersistentOverrides|Bool| whether to save the overrides or not when the component is part of a hierarchy being saved. This is useful to turn on when an item should have overrides
|PersistentOverrides|Bool| whether to save the overrides or not when the component is part of a hierarchy being saved. This is useful to turn on when an item should have overrides
|_overrides|{{RootFieldType|SyncBag`1|[[#Override|Override]]<T>}}|TypeAdv4=true| A bag of [[#Override|Override]]s that are read to make local changes to the value referenced by <code>Target</code>
|_overrides|{{RootFieldType|SyncBag`1|[[#Override|ReferenceUserOverride`1.Override]]<T>}}|TypeAdv4=true| A bag of [[#Override|Override]]s that are read to make local changes to the value referenced by <code>Target</code>
}}
}}
== Override ==
== Override ==
{{Table TypeFields
{{Table TypeFields
|User|[[#UserRef|UserRef]]|TypeAdv0=true| The [[Type:User|User]] that should see <code>Value</code>'s content inside of <code>Target</code> locally instead of <code>Default</code>'s content
|User|[[Type:UserRef|UserRef]]|TypeAdv0=true| The [[Type:User|User]] that should see <code>Value</code>'s content inside of <code>Target</code> locally instead of <code>Default</code>'s content
|Value|[[Type:SyncRef`1|SyncRef`1]]<T>|TypeAdv1=true| The value that <code>User</code> should see target driven to locally.
|Value|'''T'''|TypeAdv1=true| The value that <code>User</code> should see target driven to locally.
}}
== UserRef ==
{{Table TypeFields
|User|[[Type:SyncRef`1|SyncRef`1]]<[[Type:User|User]]>|TypeAdv0=true| The user that matches the <code>_machineId</code> and <code>_userId</code>.
|_machineId|String| The machine id last known for a [[Type:User|User]]. Is used to try to identify the user and fill <code>User</code> user ref field the next time they're in a world with this component.
|_userId|String| The user's account ID last known for a [[Type:User|User]]. Is used to try to identify the user and fill <code>User</code> user ref field the next time they're in a world with this component.
}}
}}
Line 38:
Line 31:
<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Reference User Override`1]]
[[Category:Components{{#translation:}}|Reference User Override`1]]
Latest revision as of 06:04, 17 March 2025
This is a component that allows you to locally change a reference on a value. Changing the value locally for yourself or others so that an item or world element is different depending on who's viewing it.
Component image
Reference User Override`1 component as seen in the Scene Inspector
whether to save the overrides or not when the component is part of a hierarchy being saved. This is useful to turn on when an item should have overrides