Version 2.1.0.0

InspectorUtilities class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public static class InspectorUtilities
Provides a variety of miscellaneous utilities widely used in the inspector.
Inheritance
  • System.Object
  • InspectorUtilities

Methods

BeginDrawPropertyTree(PropertyTree, Boolean)
Prepares a property tree for drawing, and handles management of undo, as well as marking scenes and drawn assets dirty.
public static void BeginDrawPropertyTree(PropertyTree tree, bool withUndo)
Parameters
PropertyTree tree

The tree to be drawn.

System.Boolean withUndo

Whether to register undo commands for the changes made to the tree. This can only be set to true if the tree has a UnityEditor.SerializedObject to represent.

Exceptions
System.ArgumentNullException

tree is null

ConvertToDeepReflectionPath(String)
Converts an Odin property path to a deep reflection path.
public static string ConvertToDeepReflectionPath(string odinPropertyPath)
Parameters
System.String odinPropertyPath

Returns
System.String

ConvertToUnityPropertyPath(String)
Converts an Odin property path (without groups included) into a Unity property path.
public static string ConvertToUnityPropertyPath(string odinPropertyPath)
Parameters
System.String odinPropertyPath

Returns
System.String

DrawPropertiesInTree(PropertyTree)
Draws all properties in a given property tree; must be wrapped by a BeginDrawPropertyTree(PropertyTree, Boolean) and EndDrawPropertyTree(PropertyTree).
public static void DrawPropertiesInTree(PropertyTree tree)
Parameters
PropertyTree tree

The tree to be drawn.

EndDrawPropertyTree(PropertyTree)
Ends drawing a property tree, and handles management of undo, as well as marking scenes and drawn assets dirty.
public static void EndDrawPropertyTree(PropertyTree tree)
Parameters
PropertyTree tree

The tree.

RegisterUnityObjectDirty(Object)
public static void RegisterUnityObjectDirty(Object unityObj)
Parameters
UnityEngine.Object unityObj