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 |