Component:ReferenceEqualityDriver: Difference between revisions

From Resonite Wiki
imported>Xekri
Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=ReferenceEqualityDriver`1Component.png |Name=Reference Equality Driver`1 }} <!--T:2--> == F..."
 
Add info
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ReferenceEqualityDriver`1Component.png
|Image=ReferenceEqualityDriver`1Component.png
|Name=Reference Equality Driver`1
|Name=Reference Equality Driver`1
}}
}}
The '''ReferenceEqualityDriver''' component checks the equality of two objects and says whether they are equal. For objects that define their own behavior for checking Equality (Like Bounding boxes) this will check based on that logic (for Bounding boxes they only need to be numerically equal, like being the same size and center).


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetReference|SyncRef`1|TypeString0=SyncRef<IWorldElement>|
|TargetReference|{{RootFieldType|RelayRef`1|[[Type:SyncRef`1|SyncRef`1]]&lt;T&gt;}}|TypeAdv0=true| The reference to check.
|Reference|IWorldElement|
|Reference|'''T'''|TypeAdv1=true| The reference to use as a thing to compare against.
|Target|IField`1|TypeString2=IField<bool>|
|Target|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv2=true| The boolean field to drive to whether <code>TargetReference</code> and <code>Reference</code> are equal. Doesn't always mean they are the exact same object.
|Invert|Bool| Whether to invert the result sent to <code>Target</code>.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and provide a reference object to check against, or provide nothing to check against if null or not null. Then put in a field to check for a reference inside of, and the component will start working.


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
* [[Component:ValueEqualityDriver]]
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Reference Equality Driver`1]]
[[Category:Components{{#translation:}}|Reference Equality Driver`1]]
[[Category:Generic Components{{#translation:}}|Reference Equality Driver`1]]
[[Category:Components:Transform:Drivers{{#translation:}}|Reference Equality Driver`1]]
[[Category:Components:Transform:Drivers{{#translation:}}|Reference Equality Driver`1]]

Latest revision as of 03:12, 13 November 2024

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

The ReferenceEqualityDriver component checks the equality of two objects and says whether they are equal. For objects that define their own behavior for checking Equality (Like Bounding boxes) this will check based on that logic (for Bounding boxes they only need to be numerically equal, like being the same size and center).

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.
TargetReference direct RelayRef`1<SyncRef`1<T>> The reference to check.
Reference T The reference to use as a thing to compare against.
Target field drive of Bool The boolean field to drive to whether TargetReference and Reference are equal. Doesn't always mean they are the exact same object.
Invert Bool Whether to invert the result sent to Target.

Usage

Attach to a slot and provide a reference object to check against, or provide nothing to check against if null or not null. Then put in a field to check for a reference inside of, and the component will start working.

Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


See Also