docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method IsDescendentOf

    IsDescendentOf(Transform, Transform)

    Check if a transform is a descendent of another transform.

    Declaration
    public static bool IsDescendentOf(Transform transform, Transform ancestor)
    Parameters
    Type Name Description
    Transform transform

    Transforms to check.

    Transform ancestor

    Transform's ancestor.

    Returns
    Type Description
    bool

    Returns true if the transform is a descendent. False otherwise.

    In This Article
    Back to top
    Copyright © 2023 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)