yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.68k stars 135 forks source link

implement Array element preview #53

Open in0finite opened 1 year ago

in0finite commented 1 year ago

Array/List elements now have a text "preview", instead of just the element index.

After :

image

Before :

image

Sorry for bad code formatting.

msamora-supernatural commented 1 year ago

Adding a refresh keeps the element previews up to date. public override void Refresh() { base.Refresh(); foreach (var element in elements) { if (element.Value != null) { element.NameRaw = element.NameRaw.Split(':')[0] + ": " + GetArrayElementPreviewText(element.Value); } } }