Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to use as unity editor window? #27

Open
nicodrive opened this issue Aug 12, 2019 · 1 comment
Open

is it possible to use as unity editor window? #27

nicodrive opened this issue Aug 12, 2019 · 1 comment

Comments

@nicodrive
Copy link

No description provided.

@Meragon
Copy link
Owner

Meragon commented Aug 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants