docs.unity3d.com
    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

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    [Serializable]
    public struct GhostType : IComponentData, IQueryTypeParameter, IEquatable<GhostType>

    Methods

    Equals(Object)

    Returns whether or not the 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
    Boolean

    True if equal to the passed in GhostType.

    Overrides
    ValueType.Equals(Object)

    Equals(GhostType)

    Returns whether or not the reference is identical to the current instance.

    Declaration
    public bool Equals(GhostType other)
    Parameters
    Type Name Description
    GhostType other
    Returns
    Type Description
    Boolean
    Implements
    IEquatable<T>.Equals(T)

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

    Overrides
    ValueType.GetHashCode()

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023