docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor NetworkObjectReference

    NetworkObjectReference(NetworkObject)

    Creates a new instance of the NetworkObjectReference struct.

    Declaration
    public NetworkObjectReference(NetworkObject networkObject)
    Parameters
    Type Name Description
    NetworkObject networkObject

    The NetworkObject to reference.

    Exceptions
    Type Condition
    ArgumentNullException
    ArgumentException

    NetworkObjectReference(GameObject)

    Creates a new instance of the NetworkObjectReference struct.

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

    The GameObject from which the NetworkObject component will be referenced.

    Exceptions
    Type Condition
    ArgumentNullException
    ArgumentException
    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)