Unity-WinForms icon indicating copy to clipboard operation
Unity-WinForms copied to clipboard

is it possible to use as unity editor window?

Open nicodrive opened this issue 6 years ago • 1 comments

nicodrive avatar Aug 12 '19 09:08 nicodrive

Yes, it is possible, but complicated and you will need to change some source code. Basically you need to duplicate UnityWinForms class, make it derive it from EditorWindow, call Awake manually when you showing a window, set line 67 to

gResources = Resources.FindObjectsOfTypeAll<UnityWinForms>()[0];

and also change lines 116 to 121 to use local resources, then you want change method GUI_SetFont in UnityGdi class or somehow manage resource pointer by your own, and then change UpdateMouse & UpdateKeys methods in your new class so they can acquire mouse and key events from editor window. And also call Repaint method in Update.

But yeah, it's not supported #17 , and I don't think it's reasonable right now to make it happen.

scr

Meragon avatar Aug 12 '19 11:08 Meragon