docs.unity.cn
    Show / Hide Table of Contents

    Struct GhostReceiveSystem

    System present only in clients worlds, receive and decode the ghost snapshosts sent by the server.

    When a new snapshost is received, the system will start decoding the packet protocol by extracting:

    -the list of ghost that need to despawned

    -for each serialized ghost, it delta-compressed or uncompressed state

    The system will schedule spawning and despawning ghosts requests, by using the GhostSpawnBuffer, and Unity.NetCode.GhostDespawnQueues respectively.

    When a new state snapshot is received for a ghost that has been already spawned (see SpawnedGhostEntityMap), the state is deserialized and added to the entity SnapshotDataBuffer history buffer.

    The received snapshot are recorded into the NetworkSnapshotAck, that will then used to send back to the server, as part of the command stream, the latest received snapshot by the client.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    [WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation | WorldSystemFilterFlags.ThinClientSimulation, WorldSystemFilterFlags.Default)]
    [UpdateInGroup(typeof(GhostSimulationSystemGroup))]
    [UpdateAfter(typeof(PrespawnGhostSystemGroup))]
    [UpdateAfter(typeof(GhostCollectionSystem))]
    [UpdateAfter(typeof(NetDebugSystem))]
    [BurstCompile]
    public struct GhostReceiveSystem : ISystem
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, September 13, 2023