docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddGameObject

    AddGameObject(bool)

    Create a gameObject in the stage

    Declaration
    public GameObject AddGameObject(bool persistent = false)
    Parameters
    Type Name Description
    bool persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    Returns
    Type Description
    GameObject
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)