docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetNamedChild

    GetNamedChild(GameObject, string)

    Gets a descendant GameObject with a specific name

    Declaration
    public static GameObject GetNamedChild(this GameObject go, string name)
    Parameters
    Type Name Description
    GameObject go

    The parent object that is searched for a named child.

    string name

    Name of child to be found.

    Returns
    Type Description
    GameObject

    The returned child GameObject or null if no child is found.

    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)