docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryGet

    TryGet(out NetworkObject, NetworkManager)

    Tries to get the NetworkObject referenced by this reference.

    Declaration
    public bool TryGet(out NetworkObject networkObject, NetworkManager networkManager = null)
    Parameters
    Type Name Description
    NetworkObject networkObject

    The NetworkObject which was found. Null if no object was found.

    NetworkManager networkManager

    The networkmanager. Uses Singleton to resolve if null.

    Returns
    Type Description
    bool

    True if the NetworkObject was found; False if the NetworkObject was not found. This can happen if the NetworkObject has not been spawned yet. you can try getting the reference at a later point in time.

    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)