Class Utils
public static class Utils
- Inheritance
-
Utils
- Inherited Members
-
Methods
DeleteElement(SerializedProperty, int)
public static void DeleteElement(SerializedProperty property, int index)
Parameters
property SerializedProperty
index int
DeleteElement<T>(ref T[], int)
public static void DeleteElement<T>(ref T[] array, int index)
Parameters
array T[]
index int
Type Parameters
T
public static Component FindClosestComponentInHierarchy(this Transform startFrom, Type type, GameObject[] roots = null)
Parameters
startFrom Transform
type Type
roots GameObject[]
Returns
- Component
public static T FindClosestComponentInHierarchy<T>(this Transform startFrom, GameObject[] roots = null) where T : Component
Parameters
startFrom Transform
roots GameObject[]
Returns
- T
Type Parameters
T
GetFieldInfoFromProperty(SerializedProperty, out Type)
public static FieldInfo GetFieldInfoFromProperty(SerializedProperty property, out Type type)
Parameters
property SerializedProperty
type Type
Returns
- FieldInfo
GetPath(Object)
public static string GetPath(this UnityEngine.Object obj)
Parameters
obj Object
Returns
- string
GetTempContent(SerializedProperty)
public static GUIContent GetTempContent(SerializedProperty property)
Parameters
property SerializedProperty
Returns
- GUIContent
GetTempContent(string, string, Texture2D)
public static GUIContent GetTempContent(string text = "", string tooltip = "", Texture2D image = null)
Parameters
text string
tooltip string
image Texture2D
Returns
- GUIContent
GetTypedNamesAndValues(Type, out string[], out long[], bool)
public static bool GetTypedNamesAndValues(Type type, out string[] names, out long[] values, bool resolveDisplayName = true)
Parameters
type Type
names string[]
values long[]
resolveDisplayName bool
Returns
- bool
IsAvailableOnRuntime(Object)
public static bool IsAvailableOnRuntime(this UnityEngine.Object gameObjectOrComponent)
Parameters
gameObjectOrComponent Object
Returns
- bool
IsValid(object)
public static bool IsValid(this object obj)
Parameters
obj object
Returns
- bool
IterateAllComponents<T>(GameObject, bool)
public static IEnumerable<T> IterateAllComponents<T>(this GameObject gameObject, bool includeEditorOnly = false) where T : Component
Parameters
gameObject GameObject
includeEditorOnly bool
Returns
- IEnumerable<T>
Type Parameters
T
IterateAllComponents<T>(Scene, bool)
public static IEnumerable<T> IterateAllComponents<T>(this Scene scene, bool includeEditorOnly = false) where T : Component
Parameters
scene Scene
includeEditorOnly bool
Returns
- IEnumerable<T>
Type Parameters
T
public static IEnumerable<T> IterateAllComponents<T>(Stack<Transform> pending, bool includeEditorOnly) where T : Component
Parameters
pending Stack<Transform>
includeEditorOnly bool
Returns
- IEnumerable<T>
Type Parameters
T
SetBoxedValue(SerializedProperty, object)
public static void SetBoxedValue(this SerializedProperty serializedProperty, object value)
Parameters
serializedProperty SerializedProperty
value object
ToDelegate<TDelegate>(MethodInfo, object)
public static TDelegate ToDelegate<TDelegate>(this MethodInfo method, object target = null) where TDelegate : Delegate
Parameters
method MethodInfo
target object
Returns
- TDelegate
Type Parameters
TDelegate