docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetChildCount

    GetChildCount()

    Gets the number of children.

    Declaration
    public int GetChildCount()
    Returns
    Type Description
    int

    Returns the number of children.

    Remarks

    This takes a dependency on the child count.

    GetChildCount(Component)

    Gets the number of children for a given component.

    Declaration
    public int GetChildCount(Component component)
    Parameters
    Type Name Description
    Component component

    The Object to get the child count from.

    Returns
    Type Description
    int

    Returns the number of children.

    Remarks

    This takes a dependency on the child count.

    GetChildCount(GameObject)

    Gets the number of children for a given GameObject.

    Declaration
    public int GetChildCount(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject to get the child count from.

    Returns
    Type Description
    int

    Returns the number of children.

    Remarks

    This takes a dependency on the child count.

    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)