ImGui.NET icon indicating copy to clipboard operation
ImGui.NET copied to clipboard

Running with unity on OnGUI()

Open Jirubizu opened this issue 4 years ago • 2 comments

Hey, I am trying to get it working with Unity on the OnGUI method. I have a simple menu right now that if its enabled it should just display the following if (menu) { ImGui.Begin("New Window"); ImGui.Text("FUCK"); ImGui.End(); }

Normal Unity UI rendering works however it does not work with ImGUI.

I realise I am probably doing something dumb but I am unsure of what so any help would be appreciated

Jirubizu avatar May 27 '20 21:05 Jirubizu

Bumping this. Anyone? I have the same problem.

EricPlayZ avatar Aug 11 '20 14:08 EricPlayZ

Yep you have no idea what you're doing. Unity's OnGUI is designed for its own imgui, not for dearimgui which has nothing to do with it, and can be called (and should be called) from anywhere. OnGUI is getting called several times per frame, for different events so placing dearimgui code there unless you are doing Event.type == repaint, or something... It's just redundant. You are using dearmimgui to AVOID using unitys slow and limited imgui implementation.

babooncodes avatar Oct 15 '20 13:10 babooncodes