PropertyOrderAttribute

PropertyOrder is used on any property, and allows for ordering of properties.

Use this to define in which order your properties are shown.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)32767, AllowMultiple = False, Inherited = True)]
public class PropertyOrderAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Fields

Return Type Definition Description
int Order The order for the property.

Constructors

Definition Description
PropertyOrderAttribute() Initializes a new instance of the PropertyOrderAttribute class.
PropertyOrderAttribute(int) Defines a custom order for the property.

Example

The following example shows how PropertyOrder is used to order properties in the inspector.

public class MyComponent : MonoBehaviour
{
	[PropertyOrder(1)]
	public int MySecondProperty;

	[PropertyOrder(-1)]
	public int MyFirstProperty;
}