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
Syntax
[Serializable]
public struct GhostType : IComponentData, IQueryTypeParameter, IEquatable<GhostType>
Methods
Equals(Object)
Returns whether or not the 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 |
---|---|
Boolean | True if equal to the passed in |
Overrides
Equals(GhostType)
Returns whether or not the
Declaration
public bool Equals(GhostType other)
Parameters
Type | Name | Description |
---|---|---|
GhostType | other |
Returns
Type | Description |
---|---|
Boolean |
Implements
GetHashCode()
Return an hashcode suitable for inserting the component into a dictionary or a sorted container.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | True if equal to the passed in |
Overrides
Operators
Equality(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 |
---|---|
Boolean | True if the the types guids are the same. |
Explicit(GhostType to Hash128)
Convert a GhostType to a 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 |
Inequality(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 |
---|---|
Boolean | True if the the types guids are the different. |