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