docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddComponentToObject

    AddComponentToObject<T>(Guid)

    Helper class to add a component to the GameObject with a NetoworkObject component

    Declaration
    public static T AddComponentToObject<T>(Guid gameObjectIdentifier) where T : NetworkBehaviour
    Parameters
    Type Name Description
    Guid gameObjectIdentifier

    ID returned to reference the game object

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    NetworkBehaviour component being added to the GameObject

    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)