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)448, AllowMultiple = False, Inherited = True)]
public class PropertyOrderAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.4.1

Constructors

Definition Description
PropertyOrderAttribute(int) Defines a custom order for the property.

Properties

Return Type Definition Description
int Order The 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;
}