PropertyTreeExtensions

Extension method for Odin Inspector's PropertyTree. Provides a one-line helper to draw a property at a given path.

Definition

Namespace: Paragon.Editor Assembly: Editor assembly

public static class PropertyTreeExtensions

Dependencies: Sirenix.OdinInspector.Editor

Quick Lookup

Goal
Method

Draw a property by path

tree.DrawPropertyAtPath("myField")

Methods

DrawPropertyAtPath

Retrieves a property from the tree by path and immediately draws it. Equivalent to calling propertyTree.GetPropertyAtPath(path).Draw().

public static void DrawPropertyAtPath(this PropertyTree propertyTree, string propertyPath)
Parameter
Type
Description

propertyTree

PropertyTree

The property tree to draw from

propertyPath

string

Dot-separated path to the property (e.g., "myField" or "nested.field")

circle-info

Uses Odin's GetPropertyAtPath() which resolves dot-separated paths through the serialized object hierarchy. The path format follows Odin conventions (e.g., "listField.$0" for list elements).

Common Pitfalls

circle-exclamation

Examples

Drawing specific properties in a custom editor

See Also

Last updated