docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class GameObjectExtensions

    Extensions methods for the GameObject class.

    Inheritance
    object
    GameObjectExtensions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Assembly: solution.dll
    Syntax
    public static class GameObjectExtensions

    Methods

    Name Description
    AddToHideFlagsRecursively(GameObject, HideFlags)

    Adds hideFlags to the hide flags on this GameObject and all of its descendants.

    SetHideFlagsRecursively(GameObject, HideFlags)

    Sets the hide flags on this GameObject and all of its descendants.

    SetLayerAndAddToHideFlagsRecursively(GameObject, int, HideFlags)

    Sets the layer of this GameObject and adds to its HideFlags, and does the same for all of its descendants.

    SetLayerAndHideFlagsRecursively(GameObject, int, HideFlags)

    Sets the layer and HideFlags of this GameObject and all of its descendants.

    SetLayerRecursively(GameObject, int)

    Sets the layer of this GameObject and all of its descendants.

    SetRunInEditModeRecursively(GameObject, bool)

    Sets runInEditMode for all MonoBehaviours on this GameObject and its children.

    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)