docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddNewControl

    AddNewControl(GameObject)

    Adds a new UI control to the control panel. If the control cannot be added and the method will return false. Also, all UI elements must have a LayoutElement component and if they do not, this method will reject the new element, and return false.

    Declaration
    public bool AddNewControl(GameObject uiControl)
    Parameters
    Type Name Description
    GameObject uiControl

    The control that is to be added to the control panel

    Returns
    Type Description
    bool

    True if the control could be added, false if it there was a problem adding it

    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)