Community Made Tools

Have you made any useful utilities with Odin?

Login and submit your creations here

OrderRelativeToAttribute - Easily adjust property order for properties.

Authored by Thanasis
Shared 28-02-2020

This is an attribute that helps position properties on the desired order in the inspector without having to add a [PropertyOrder(x)] attribute to every other value.


public class Test : MonoBehaviour {
     public int myInt1;
     public int myInt2;
     [Range(0,1)] public float decimals;

     [OrderRelativeTo("myInt2")] float sum => myInt1 + myInt2 + decimals;

Link to script: