1.12.0: Added FieldLabelFromArrayIndex

This commit is contained in:
Anders Ejlersen 2026-06-13 21:34:44 +02:00
parent df1d2f6df1
commit 23b24d42d3
6 changed files with 71 additions and 1 deletions

View file

@ -0,0 +1,26 @@
using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class FieldLabelFromArrayIndexAttribute : PredrawerModifierPropertyAttribute
{
public readonly string prefix;
public readonly string postfix;
public readonly int offset;
public FieldLabelFromArrayIndexAttribute(string prefix, int offset = 0)
{
this.prefix = prefix;
postfix = null;
this.offset = offset;
}
public FieldLabelFromArrayIndexAttribute(string prefix, string postfix, int offset = 0)
{
this.prefix = prefix;
this.postfix = postfix;
this.offset = offset;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 84143cf4320e4ead85b143498a27f8c4
timeCreated: 1781374352