docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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

    Implements
    IComponentData
    IQueryTypeParameter
    IEquatable<GhostType>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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 GhostType.

    Overrides
    ValueType.Equals(object)

    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 GhostType.

    Overrides
    ValueType.GetHashCode()

    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 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.

    Implements

    IComponentData
    IQueryTypeParameter
    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)