10 private readonly
Map labels =
new Map();
11 private readonly
string label;
18 for (var i = 0; i < labels.Length; i+=2) this.labels.Add(labels[i], labels[i+1]);
22 public void Change(GUIContent guiLabel) => guiLabel.text = labels[guiLabel.text].Found
23 ? labels.Value?.ToString() ?? label ?? guiLabel.text
24 : label ?? guiLabel.text;
LabelsAttribute(string label)
[Labels("name")]
Change label for generic components
LabelsAttribute(params string[] labels)
Many labels
Save label name to change attribute field descriptors
void Change(GUIContent guiLabel)
Make the switch in the Inspector