docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetNetworkPrefabOverride

    GetNetworkPrefabOverride(GameObject)

    Returns the GameObject to use as the override as could be defined within the NetworkPrefab list Note: This should be used to create GameObject pools (with NetworkObject components) under the scenario where you are using the Host model as it spawns everything locally. As such, the override will not be applied when spawning locally on a Host. Related Classes and Interfaces: INetworkPrefabInstanceHandler

    Declaration
    public GameObject GetNetworkPrefabOverride(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    the GameObject to be checked for a NetworkManager defined NetworkPrefab override

    Returns
    Type Description
    GameObject

    a GameObject that is either the override or if no overrides exist it returns the same as the one passed in as a parameter

    In This Article
    Back to top
    Copyright © 2024 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)