Documentation

Unity Engine


Unity Engine


EntityGuid

This component is attached to converted Entities and is guaranteed to be unique within a World. It can be used to map back to the authoring GameObject from which it was converted. Note that an EntityGuid does not have enough information to be persistent across sessions.
Read time 1 minuteLast updated a day ago

Definition

public struct EntityGuid : IComponentData, IQueryTypeParameter, IEquatable<EntityGuid>, IComparable<EntityGuid>

Static Fields

Value

Description

NullStatic value that represents an invalid EntityGuid.

Constructors

Properties

Property

Description

NamespaceAndSerialA unique number combining the FullNamespaceId and Serial into a ulong.
OriginatingEntityIdSession-unique ID for originating object (typically the authoring GameObject's EntityId).
OriginatingSubEntityIdSecondary session-unique ID for the originating object. This is typically the authoring Component's EntityId.
SerialA unique number used to differentiate Entities associated with the same originating object and namespace.

Methods

Method

Description

CompareToCompares an EntityGuid against a given one to find their sort order.
EqualsChecks if two objects are EntityGuid instances and if they are equal.
GetHashCodeComputes a hashcode to support hash-based collections.
ToStringConverts this EntityGuid to a standard C# string representation.

Operators

Operator

Description

operator ==Checks if two EntityGuid instances are equal.
operator !=Checks if two EntityGuid instances aren't equal.