docs.unity3d.com
    Show / Hide Table of Contents

    Struct PrespawnGhostSerializer

    Build the ghost baseline for all the pre-spawned ghosts present in the world. The job will add to the entities a new buffer, PrespawGhostBaseline, witch will contains the a pre-serialized snapshot of the entity at the time the job run.

    NOTE: The serialization does not depend on component stripping (it is only dependent on the ghost type archetype serializer /omponent that is guarantee to be same on both client and server and that is handled by the GhostCollectionSystem)

    Namespace: Unity.NetCode
    Syntax
    [BurstCompatible]
    [BurstCompile]
    public struct PrespawnGhostSerializer : IJobChunk

    Fields

    baselineHashes

    Declaration
    public NativeArray<ulong> baselineHashes
    Field Value
    Type Description
    NativeArray<UInt64>

    childEntityLookup

    Declaration
    [ReadOnly]
    public StorageInfoFromEntity childEntityLookup
    Field Value
    Type Description
    StorageInfoFromEntity

    entityType

    Declaration
    [ReadOnly]
    public EntityTypeHandle entityType
    Field Value
    Type Description
    EntityTypeHandle

    ghostChunkComponentTypes

    Declaration
    [ReadOnly]
    public DynamicTypeList ghostChunkComponentTypes
    Field Value
    Type Description
    DynamicTypeList

    GhostCollectionFromEntity

    Declaration
    [ReadOnly]
    public BufferFromEntity<GhostCollectionPrefab> GhostCollectionFromEntity
    Field Value
    Type Description
    BufferFromEntity<GhostCollectionPrefab>

    GhostCollectionSingleton

    Declaration
    public Entity GhostCollectionSingleton
    Field Value
    Type Description
    Entity

    GhostComponentCollectionFromEntity

    Declaration
    [ReadOnly]
    public BufferFromEntity<GhostComponentSerializer.State> GhostComponentCollectionFromEntity
    Field Value
    Type Description
    BufferFromEntity<GhostComponentSerializer.State>

    GhostComponentIndexFromEntity

    Declaration
    [ReadOnly]
    public BufferFromEntity<GhostCollectionComponentIndex> GhostComponentIndexFromEntity
    Field Value
    Type Description
    BufferFromEntity<GhostCollectionComponentIndex>

    ghostFromEntity

    Declaration
    [ReadOnly]
    public ComponentDataFromEntity<GhostComponent> ghostFromEntity
    Field Value
    Type Description
    ComponentDataFromEntity<GhostComponent>

    GhostTypeCollectionFromEntity

    Declaration
    [ReadOnly]
    public BufferFromEntity<GhostCollectionPrefabSerializer> GhostTypeCollectionFromEntity
    Field Value
    Type Description
    BufferFromEntity<GhostCollectionPrefabSerializer>

    ghostTypeComponentType

    Declaration
    [ReadOnly]
    public ComponentTypeHandle<GhostTypeComponent> ghostTypeComponentType
    Field Value
    Type Description
    ComponentTypeHandle<GhostTypeComponent>

    linkedEntityGroupType

    Declaration
    [ReadOnly]
    public BufferTypeHandle<LinkedEntityGroup> linkedEntityGroupType
    Field Value
    Type Description
    BufferTypeHandle<LinkedEntityGroup>

    prespawnBaseline

    Declaration
    [NativeDisableParallelForRestriction]
    public BufferTypeHandle<PrespawnGhostBaseline> prespawnBaseline
    Field Value
    Type Description
    BufferTypeHandle<PrespawnGhostBaseline>

    Methods

    Execute(ArchetypeChunk, Int32, Int32)

    Declaration
    public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex)
    Parameters
    Type Name Description
    ArchetypeChunk chunk
    Int32 chunkIndex
    Int32 firstEntityIndex
    Implements
    IJobChunk.Execute(ArchetypeChunk, Int32, Int32)
    Back to top
    Terms of use
    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