SaintsField
SaintsField copied to clipboard
is there an attrib that changes the name of element into a chosen field?
For example this:
where elements 0 is replaced by "Acknowledge" as if I were to use a string instead of enum.
I tried this workaround but it won't fool Unity :D
Yes
[Serializable]
public enum ANIMSTATE
{
None,
State,
AnotherState,
}
[Serializable]
public struct AudioStateClips
{
public ANIMSTATE state;
}
[RichLabel(nameof(LabelAudioStateClips), true)]
public AudioStateClips[] audioClips;
public string LabelAudioStateClips(AudioStateClips clip, int index)
{
return $"{clip.state} ({index})";
}
wow nice! thanks!