文档

Unity Engine

Unity Engine

Equals

Determines whether the specified object is equal to this EntityId.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

Equals(Object)

Determines whether the specified object is equal to this EntityId.
public override bool Equals(object obj)

Parameters

The object to compare with this EntityId. Non-EntityId values always return false.

Returns

Type

Description

boolTrue if the object is an EntityId and equals this instance; otherwise, false.

Equals(EntityId)

Determines whether the specified EntityId is equal to this EntityId.
public bool Equals(EntityId other)

Parameters

The EntityId to compare with this EntityId.

Returns

Type

Description

boolTrue if the EntityIds are equal; otherwise, false.

Equals(int)

Determines whether the specified integer value is equal to this EntityId.
public bool Equals(int other)

Parameters

other

The integer value to compare with this EntityId.

Returns

Type

Description

boolTrue if the integer representation equals this EntityId; otherwise, false.

Remarks

This overload exists so that code that still contains object identifiers in integers keeps working. Compare
EntityId
values with each other where possible.