文档

Unity Engine

Unity Engine

CompareTo(EntityId)

Compares this EntityId to another EntityId.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public int CompareTo(EntityId other)

Parameters

The EntityId to compare against.

Returns

Type

Description

intA negative value if this EntityId is less than the other, zero if they are equal, or a positive value if this EntityId is greater.

Remarks

The ordering of
EntityId
values is arbitrary and does not reflect creation order or any other meaningful property. Do not rely on the comparison result for anything other than establishing a consistent ordering for data structures that require it (such as sorted collections).