Dynamic order of properties?

Issue #220 open
Former user created an issue

Hey there!

Would it be possible to dynamically order properties?

We would need this for complex layered data types, where the same basic sub types would often differ in inspector position.

Usage perhaps similar to altering a [LabelText] by a $ function, e.g.:

[PropertyOrder("$orderStringValue1")] // instead of fixed case of [PropertyOrder(int)] public string stringValue1;

int orderStringValue() { switch( effect ) { case Effect.SetAnimatorParameter: return 5; break; case Effect.SetAnimatorLookAt: return 2; break; default: return 0; break; } }

At the moment this message would occur: *CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression. *

Thanks!

Comments (2)

  1. Tor Esa Vestergaard
    • changed status to open

    This is an interesting idea! Sadly we can't do it right now, but we will make sure to keep this in mind for our property system rebuild for patch 1.1 - it ought to have the capability.

  2. Log in to comment