Webview being hidden by Unity UI on MacOS Catalina 10.15.7
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
Upgraded my Mac to Catalina 10.15.7 and was finding my project was crashing when loading into Unity due to disabling Metal support, so upgraded to latest gree-webview version with metal support to get around this problem.
I now find that when running in the Unity Editor the webview is not visible and seems to be hidden behind my Unity UI drawn with a screen space overlay canvas. If I disable my game object with the canvas then the webview display can be seen, so it clearly is rendering correctly but somehow being drawn first or perhaps hidden due to depth buffer or something like that?
For now my workaround is to run using the 'separated' option which appears to work OK, but would ideally like to get it working in the Game view as it's easier to test my app that way.
I've tried the sample code and that works well so it seems something in my app could be to blame? Anything you can think of that might cause this behaviour? I do create two instances of the webview at startup in my app, although I have tried reducing this to one and it made no difference.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the Unity Editor on macOS Catalina with Metal support enabled, a screen space overlay canvas, and the webview in Game view. Compare the sample code with the affected app, including the setup with two webview instances and the separated option. Done means the webview remains visible in Game view while the canvas is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, unity
- Domain
- desktop, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100