文档

Unity Engine

Unity Engine

FastEquality

Utility to look up equality and hashcode functions for component types.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Struct
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
[BurstCompile]public struct FastEquality

Remarks

The TypeManager uses this type internally and you shouldn't need to create or directly use this in the majority of use cases. When possible, a Burst-compilable implementation is preferred, but if an IEquatable{T} method isn't marked as Burst compiled, the managed version is used instead.

Static Methods

Method

Description

AddExtraAOTTypesInternal method used for populating closed forms of generic equality methods to ensure IL2CPP can generate transpiled implementations and ensure they are not-stripped from builds.
EqualsCompares two component types.

Structs

Struct

Description

FastEquality.TypeInfoType holding one component's Equals and GetHashCode implementations as well as the size of the underlying unmanaged component type