Class ObjectTreeUtil | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ObjectTreeUtil

    A collection of tools for finding objects

    Inheritance
    System.Object
    ObjectTreeUtil
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: SaveDuringPlay
    Syntax
    public static class ObjectTreeUtil

    Methods

    FindAllBehavioursInScene<T>()

    This finds all the behaviours in scene, active or inactive, excluding prefabs

    Declaration
    public static T[] FindAllBehavioursInScene<T>()where T : MonoBehaviour
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    FindAllRootObjectsInScene()

    Finds all the root objects in a scene, active or not

    Declaration
    public static GameObject[] FindAllRootObjectsInScene()
    Returns
    Type Description
    GameObject[]

    FindObjectFromFullName(String, GameObject[])

    Will find the named object, active or inactive, from the full path.

    Declaration
    public static GameObject FindObjectFromFullName(string fullName, GameObject[] roots)
    Parameters
    Type Name Description
    System.String fullName
    GameObject[] roots
    Returns
    Type Description
    GameObject

    GetFullName(GameObject)

    Get the full name of an object, travelling up the transform parents to the root.

    Declaration
    public static string GetFullName(GameObject current)
    Parameters
    Type Name Description
    GameObject current
    Returns
    Type Description
    System.String
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023