docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GhostCount

    Singleton component with APIs and collections required for Ghost counting.

    Implements
    IComponentData
    IQueryTypeParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    [BurstCompile]
    public struct GhostCount : IComponentData, IQueryTypeParameter

    Properties

    GhostCountOnClient

    The total number of ghosts received by this client the last time a snapshot was received. The number of received ghosts can be different from the number of currently spawned ghosts. Use this and GhostCountOnServer to figure out how much of the state the client has received.

    Declaration
    public int GhostCountOnClient { get; }
    Property Value
    Type Description
    int

    GhostCountOnServer

    The total number of ghosts on the server the last time a snapshot was received. Use this and GhostCountOnClient to figure out how much of the state the client has received.

    Declaration
    public int GhostCountOnServer { get; }
    Property Value
    Type Description
    int

    Methods

    ToFixedString()

    Logs 'GhostCount[c:X,s:X]'.

    Declaration
    public FixedString128Bytes ToFixedString()
    Returns
    Type Description
    FixedString128Bytes

    Logs 'GhostCount[c:X,s:X]'.

    Implements

    IComponentData
    IQueryTypeParameter
    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)