docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GhostCollectionPrefab

    A list of all prefabs which can be used for ghosts. This is populated with all ghost prefabs on the server and that list is sent for clients. Having a prefab in this list does not guarantee that there is a serializer for it yet. Added to the GhostCollection singleton entity.

    Implements
    IBufferElementData
    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
    [InternalBufferCapacity(0)]
    public struct GhostCollectionPrefab : IBufferElementData
    Remarks

    The list is sorted by the value of the GhostType guid.

    Fields

    GhostPrefab

    A reference to the prefab entity. The reference is initially equals to Unity.Entities.Entity.Null and assigned by the GhostCollectionSystem when prefabs are processed.

    Declaration
    public Entity GhostPrefab
    Field Value
    Type Description
    Entity

    GhostType

    Component storing the guid of the prefab the ghost was created from. This is used to lookup ghost type in a robust way which works even if two ghosts have the same archetype

    Declaration
    public GhostType GhostType
    Field Value
    Type Description
    GhostType

    Loading

    Game code should set this to LoadingActive if the prefab is currently being loaded. The collection system will set it to LoadingNotActive every frame, so game code must reset it to LoadingActive every frame the prefab is still loading.

    Declaration
    public GhostCollectionPrefab.LoadingState Loading
    Field Value
    Type Description
    GhostCollectionPrefab.LoadingState

    Implements

    Unity.Entities.IBufferElementData
    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)