InspectorProperty

Represents a property in the inspector, and provides the hub for all functionality related to that property.

namespace Sirenix.OdinInspector.Editor
{
public sealed class InspectorProperty
}

Requirements

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector
Version: 1.0.6.1

Static Methods

Return Type Definition Description
Type GetBaseContainedValueType(InspectorProperty) Gets the base contained value type of an InspectorProperty, IE, the type that this property is absent polymorphism.

Properties

Return Type Definition Description
PropertyValueEntry BaseValueEntry The value entry that represents the base value of this property.
PropertyChildren Children The children of this property.
PropertyContextContainer Context The context container of this property.
string DeepReflectionPath

The full path of this property as used by deep reflection, containing all the necessary information to find this property through reflection only. This is used as the path for prefab modifications.

int DrawCount The amount of times that the property has been drawn so far this frame.
int DrawerChainIndex How deep in the drawer chain the property currently is, in the current drawing session as determined by DrawCount.
int Index The child index of this property.
InspectorPropertyInfo Info The InspectorPropertyInfo of this property.
GUIContent Label The cached label of the property, usually containing NiceName.
Rect LastDrawnValueRect The last rect that this property was drawn within.
string Name The name of the property.
string NiceName The nice name of the property, usually as converted by String).
InspectorProperty Parent The parent of the property. If null, this property is a root-level property in the PropertyTree.
Type ParentType The type on which this property is declared. This is the same as TypeOfOwner.
ImmutableList ParentValues The parent values of this property, by selection index; this represents the values that 'own' this property, on which it is declared.
string Path The full Odin path of the property. To get the Unity property path, see UnityPropertyPath.
int RecursiveDrawDepth

The current recursive draw depth, incremented for each time that the property has caused itself to be drawn recursively.

Note that this is the unknown:<i>(6429,10) recursion level, not the total amount of recursions so far this frame.

bool SupportsPrefabModifications Whether this property supports having prefab modifications applied or not.
PropertyTree Tree The PropertyTree that this property exists in.
string UnityPropertyPath

The full Unity property path of this property; note that this is merely a converted version of Path, and not necessarily a path to an actual Unity property.

In the case of Odin-serialized data, for example, no Unity properties will exist at this path.

IPropertyValueEntry ValueEntry The value entry that represents the strongly typed value of the property; this is possibly an alias entry in case of polymorphism.

Methods

Return Type Definition Description
void Draw() Draws this property in the inspector. This is a shorthand for DrawProperty(InspectorProperty).
void Draw(GUIContent) Draws this property in the inspector with a given label. This is a shorthand for DrawProperty(InspectorProperty, GUIContent).
InspectorProperty FindParent(PropertyValueCategory, bool) Finds the first parent property with the specified value category.
void IncrementDrawerChainIndex() Increments the current drawer chain index. This is used by DrawerChainIndex.
bool IsChildOf(InspectorProperty) Determines whether this property is the child of another property in the hierarchy.
bool IsParentOf(InspectorProperty) Determines whether this property is a parent of another property in the hierarchy.
InspectorProperty NextProperty(bool) Gets the next property in the PropertyTree, or null if none is found.
void PopDraw() Pop a draw session. This is used by DrawCount and RecursiveDrawDepth.
void PopulateGenericMenu(GenericMenu) Populates a generic menu with items from all drawers for this property that implement IDefinesGenericMenuItems.
void PushDraw() Push a draw session. This is used by DrawCount and RecursiveDrawDepth.
void Update(bool) Updates the property. This method resets the temporary context, and updates the value entry and the property children.