docs.unity.cn
    Show / Hide Table of Contents

    Method GetChildCount

    GetChildCount()

    Gets the number of children.

    Declaration
    public int GetChildCount()
    Returns
    Type Description
    Int32

    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
    Int32

    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
    Int32

    Returns the number of children.

    Remarks

    This takes a dependency on the child count.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023