docs.unity3d.com
    Show / Hide Table of Contents

    Struct SpawnedGhost

    Struct used to uniquely identify a ghost given its id and spawning time.

    Inherited Members
    ValueType.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct SpawnedGhost : IEquatable<SpawnedGhost>

    Constructors

    SpawnedGhost(Int32, NetworkTick)

    Construct a SpawnedEntity using the ghost identifier and the spawn tick>

    Declaration
    public SpawnedGhost(int ghostId, NetworkTick spawnTick)
    Parameters
    Type Name Description
    Int32 ghostId
    NetworkTick spawnTick

    SpawnedGhost(in GhostInstance)

    Construct a SpawnedEntity from a GhostInstance

    Declaration
    public SpawnedGhost(in GhostInstance ghostInstance)
    Parameters
    Type Name Description
    GhostInstance ghostInstance

    The ghost from witch t

    Fields

    ghostId

    The id assigned to the ghost by the server

    Declaration
    public int ghostId
    Field Value
    Type Description
    Int32

    spawnTick

    The tick at which the ghost has been spawned by the server

    Declaration
    public NetworkTick spawnTick
    Field Value
    Type Description
    NetworkTick

    Methods

    Equals(SpawnedGhost)

    The SpawnedGhost are identical if both id and tick match.

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

    GetHashCode()

    Produce the hash code for the SpawnedGhost.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    In This Article
    • Constructors
      • SpawnedGhost(Int32, NetworkTick)
      • SpawnedGhost(in GhostInstance)
    • Fields
      • ghostId
      • spawnTick
    • Methods
      • Equals(SpawnedGhost)
      • GetHashCode()
    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