Add OSX View over Unity?
I'm trying to figure out how to write an OSX plugin that shows/removes a view (specifically a webview) that covers the screen. I've seen examples of how to write non UI OSX plugins, but can't seem to find anything that does something with UI elements.
What I've tried is finding the main window and adding the webview as a subview like this:
NSWindow *mainWindow = [[NSApplication sharedApplication] mainWindow];
[[mainWindow contentView]addSubview:_webView];
But that doesn't seem to show anything, possibly that's behind instead of in front of the Unity graphics layer?
My plugin does seem to be actually doing something because I have managed to get the webview to show up if I tell it to be full screen like this:
[_webView enterFullScreenMode:[NSScreen mainScreen] withOptions:options];
Although I'd like the webview to be constrained by the application, and that pops it out of the application it seems and makes it enter full screen mode.
Your answer
Follow this Question
Related Questions
Build error: Couldn't open unitypurchasing error, no suitable image found 0 Answers
OSX with ObjC plugins categories and "selector not found" errors at runtime 0 Answers
Cinema 4D plugin install failure (OS X Catalina) 0 Answers
[Beginner] [UI text] Adapt the size of the text zone to the text inside 2 Answers