public void ModifierUI() { if (CurrentSelectedHierarchyObject is null) { ImGui.Text("Nothing selected."); return; } string name = CurrentSelectedHierarchyObject.Name; ImGui.InputText("Name", ref name, 100); CurrentSelectedHierarchyObject.Name = name; if (ImGui.Button("Delete")) { MainClass.DeleteHierarchyObject(CurrentSelectedHierarchyObject.Parent, CurrentSelectedHierarchyObject.Name); CurrentSelectedHierarchyObject = null; return; } if (ImGui.CollapsingHeader("Attatched Scripts")) { foreach (var script in CurrentSelectedHierarchyObject.AttachedScripts) { ModifyScript(script.Key, script.Value); } if (ImGui.Button("Attatch Script")) { MainClass.AddScript(CurrentSelectedHierarchyObject, new ImaginaryScript(new ImaginaryConstructableObject()), "Test script"); } } }