{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Field NumLoadedPrefabs | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Field NumLoadedPrefabs

    The number prefab that has been loaded into the GhostCollectionPrefab collection. Use to determine which ghosts types the server can stream to the clients.

    The server report to the client the list of loaded prefabs (with their see GhostType guid) as part of the snapshot protocol. The list is dynamic; new prefabs can be added/loaded at runtime on the server, and the ones will be reported to the client.

    Clients reports to the server the number of loaded prefab as part of the command protocol. When the client receive a ghost snapshot, the ghost prefab list is processed and the GhostCollectionPrefab collection is updated with any new ghost types not present in the collection.

    The client is not required to have all prefab type in the GhostCollectionPrefab to be loaded into the world. They can be loaded/added dynamically to the world (i.e when streaming a sub-scene), and the Loading state should be used in that case to inform the GhostCollection that the specified prefabs are getting loaded into the world.

    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    public int NumLoadedPrefabs
    Returns
    Type Description
    int
    In This Article
    Back to top
    Copyright © 2023 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)