docs.unity.cn

Entities 1.0.11

    Show / Hide Table of Contents

    Method GetChildren

    GetChildren(Boolean)

    Returns the children of the GameObject

    Declaration
    public GameObject[] GetChildren(bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Returns
    Type Description
    GameObject[]

    The children of the GameObject

    Remarks

    This will take a dependency on the children

    GetChildren(Component, Boolean)

    Returns the children of the GameObject

    Declaration
    public GameObject[] GetChildren(Component component, bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    Component component

    The Object to get the children from

    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Returns
    Type Description
    GameObject[]

    The children of the GameObject

    Remarks

    This will take a dependency on the children

    GetChildren(GameObject, Boolean)

    Returns the children of the GameObject

    Declaration
    public GameObject[] GetChildren(GameObject gameObject, bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject to get the children from

    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Returns
    Type Description
    GameObject[]

    The children of the GameObject

    Remarks

    This will take a dependency on the children

    GetChildren(List<GameObject>, Boolean)

    Returns the children of the GameObject

    Declaration
    public void GetChildren(List<GameObject> gameObjects, bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    List<GameObject> gameObjects

    The children of the GameObject

    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Remarks

    This will take a dependency on the children

    GetChildren(Component, List<GameObject>, Boolean)

    Returns the children of the GameObject

    Declaration
    public void GetChildren(Component refComponent, List<GameObject> gameObjects, bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    Component refComponent

    The Object to get the children from

    List<GameObject> gameObjects

    The children of the GameObject

    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Remarks

    This will take a dependency on the children

    GetChildren(GameObject, List<GameObject>, Boolean)

    Returns the children of the GameObject

    Declaration
    public void GetChildren(GameObject gameObject, List<GameObject> gameObjects, bool includeChildrenRecursively = false)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject to get the children from

    List<GameObject> gameObjects

    The children of the GameObject

    Boolean includeChildrenRecursively

    Whether all children in the hierarchy should be added recursively

    Remarks

    This will take a dependency on the children

    In This Article
    • GetChildren(Boolean)
    • GetChildren(Component, Boolean)
    • GetChildren(GameObject, Boolean)
    • GetChildren(List<GameObject>, Boolean)
    • GetChildren(Component, List<GameObject>, Boolean)
    • GetChildren(GameObject, List<GameObject>, Boolean)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023