Documentation

Unity Engine


Unity Engine


Equals

Compares two component instances to one another
Read time 1 minuteLast updated 3 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

Equals<T>(T, T)

Compares two component instances to one another
public static bool Equals<T>(ref T left, ref T right) where T : struct

Parameters

left

T
Left-hand side of the comparison

right

T
Right-hand side of the comparison

Returns

Type

Description

boolReturns true if the types are equal.

Equals(void*, void*, TypeIndex)

Compares two component instances to one another
public static bool Equals(void* left, void* right, TypeIndex typeIndex)

Parameters

left

Left-hand side of the comparison

right

Right-hand side of the comparison

typeIndex

TypeIndex for the two instances being compared

Returns

Type

Description

boolReturns true if the types are equal.

Equals(Object, Object, TypeIndex)

Compares two component instances to one another
public static bool Equals(object left, object right, TypeIndex typeIndex)

Parameters

left

Left-hand side of the comparison

right

Right-hand side of the comparison

typeIndex

TypeIndex for the two instances being compared

Returns

Type

Description

boolReturns true if the types are equal.

Equals(Object, void*, TypeIndex)

Compares two component instances to one another
public static bool Equals(object left, void* right, TypeIndex typeIndex)

Parameters

left

Left-hand side of the comparison

right

Right-hand side of the comparison

typeIndex

TypeIndex for the two instances being compared

Returns

Type

Description

boolReturns true if the types are equal.