docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetLayerRecursively

    SetLayerRecursively(Transform, int)

    Sets the layer for the GameObject associated with transform and all its children.

    Declaration
    public static void SetLayerRecursively(this Transform transform, int layer)
    Parameters
    Type Name Description
    Transform transform

    The Transform component

    int layer

    The layer in which the game object should be.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023