Component:ReferenceField: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page ReferenceField (Component) to Component:ReferenceField: Creating component Namespace
add info
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
Reference Field is a component that is able to store a reference for later use, as long as the reference still exists by then. This can be used in tandem with a [[Component:ReferenceGrabReceiver|Reference Grab Receiver Component]] as a place to store the value received by said component. This component's <code>Reference</code> field can be accessed with ProtoFlux. Using this as a [[ProtoFlux:Data Model Store|Data Model Store]] is considered bad practice due to it making your code harder to read, use, and transfer.
{{Infobox Component
{{Infobox Component
|Image=ReferenceField`1Component.png
|Image=ReferenceField`1Component.png
Line 11: Line 11:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Reference|IWorldElement|
|Reference|'''T'''|TypeAdv0=true| A field that can be used to store any reference [[:Category:Type|type]].
}}
}}


Line 23: Line 23:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Reference Field`1]]
[[Category:Components{{#translation:}}|Reference Field`1]]
[[Category:Generic Components{{#translation:}}|Reference Field`1]]
[[Category:Components:Data{{#translation:}}|Reference Field`1]]
[[Category:Components:Data{{#translation:}}|Reference Field`1]]

Latest revision as of 17:28, 19 March 2024

Reference Field is a component that is able to store a reference for later use, as long as the reference still exists by then. This can be used in tandem with a Reference Grab Receiver Component as a place to store the value received by said component. This component's Reference field can be accessed with ProtoFlux. Using this as a Data Model Store is considered bad practice due to it making your code harder to read, use, and transfer.

Component image 
Reference Field`1 component as seen in the Scene Inspector


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.
Reference T A field that can be used to store any reference type.

Usage

Examples

Related Components