public override void DrawName(string name, Type type, Type parent, object instance = null) { Caller.Try(() => { if (type.IsArray) { if (ImGui.Button(name) && instance != null) { //instance = new Mesh[5]; ArrayInfoWindow.GetInstance().Show(instance, name); } } else if (IsGeneralType(type) == false && type.IsEnum == false) { if (ImGui.Button(name) && instance != null) { InstanceView.GetInstance().Add(parent.Name, name, type, instance); } } else { ImGui.Text(name); } }); }
static void TestArray() { int[] array = new int[5]; array[0] = 1; array[1] = 4; array[2] = 3; array[3] = 3; array[4] = 5; object obj = array; ArrayInfoWindow.GetInstance().Show(obj); }