Closed recore67 closed 7 months ago
I think the root of this issue is the GameObject gizmos stuff is handled In the GameObject class itself, that is the only reason that code needs to be in the runtime. Ideally, I think we remove ImGUI completely from the Runtime and make it Editor Only, then we make our own UI system for the runtime/games.
I've already started work on a custom UI solution for the runtime.
oh ok cool, i agree with that solution. If i may ask, can you brief me through the idea of it?
Yeah, So the first thing needs to be moving the GameObject.DrawGizmos() function into the Editors ViewportWindow class, It gets called there so moving it over shouldn't be too hard.
Then move the ImGUI folder from the Runtime to the Editor and update the namespaces Prowl.Runtime.ImGUI -> Prowl.Editor.ImGUI
I just removed a reference to ImGUI in the runtime just now, So all thats left is GameObject/SceneManager and the ImGUI folder.
Ah theres also the ImGUI Attributes like [Header("")] and whatnot for components, will need to redesign that to handle its logic in the editor, and just have the attributes in the runtime.
Moved ImGUI to the Editor, solving the original problem posed by this issue so gonna close it, ill create a new issue later on for a Runtime UI solution once i decide what exactly i wanna do regarding that.
Maybe we move it to a new file within the Runtime Utils folder? called like
RuntimeGizoms.cs
or similar. It would add to the necessity to reference the folder/namespace when used globally, but it would remove the need forusing HexaEngine.ImGuizmoNET;
inScenemanager.cs
and other places if so.