Struct GhostType
Component storing the guid of the prefab the ghost was created from. This is used to lookup ghost type in a robust way which works even if two ghosts have the same archetype
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[Serializable]
public struct GhostType : IComponentData, IQueryTypeParameter, IEquatable<GhostType>
Methods
Equals(object)
Returns whether or not the obj reference is of type GhostType
, and
whether or not it's identical to the current instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool | True if equal to the passed in |
Overrides
Equals(GhostType)
Returns whether or not the other reference is identical to the current instance.
Declaration
public bool Equals(GhostType other)
Parameters
Type | Name | Description |
---|---|---|
GhostType | other |
Returns
Type | Description |
---|---|
bool |
GetHashCode()
Return an hashcode suitable for inserting the component into a dictionary or a sorted container.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | True if equal to the passed in |
Overrides
Operators
operator ==(GhostType, GhostType)
Returns whether or not two GhostType are identical.
Declaration
public static bool operator ==(GhostType lhs, GhostType rhs)
Parameters
Type | Name | Description |
---|---|---|
GhostType | lhs | |
GhostType | rhs |
Returns
Type | Description |
---|---|
bool | True if the the types guids are the same. |
explicit operator Hash128(GhostType)
Convert a GhostType to a Unity.Entities.Hash128 instance. The hash will always match the prefab guid from which the ghost has been created.
Declaration
public static explicit operator Hash128(GhostType ghostType)
Parameters
Type | Name | Description |
---|---|---|
GhostType | ghostType |
Returns
Type | Description |
---|---|
Hash128 |
operator !=(GhostType, GhostType)
Returns whether or not two GhostType are distinct.
Declaration
public static bool operator !=(GhostType lhs, GhostType rhs)
Parameters
Type | Name | Description |
---|---|---|
GhostType | lhs | |
GhostType | rhs |
Returns
Type | Description |
---|---|
bool | True if the the types guids are the different. |