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 | Ghost type reference |
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 |
---|---|---|
Ghost |
other | Ghost type reference |
Returns
Type | Description |
---|---|
bool | whether the other reference is identical to the current instance. |
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
Returns
Type | Description |
---|---|
bool | Whether the types guids are the same. |
explicit operator Hash128(GhostType)
Convert a Ghost
Declaration
public static explicit operator Hash128(GhostType ghostType)
Parameters
Type | Name | Description |
---|---|---|
Ghost |
ghostType | Ghost type to convert |
Returns
operator !=(GhostType, GhostType)
Returns whether or not two GhostType are distinct.
Declaration
public static bool operator !=(GhostType lhs, GhostType rhs)
Parameters
Returns
Type | Description |
---|---|
bool | Whether the types guids are the same. |