We have a project using a plugin named StandaloneFileBrowser, which provides methods to open file browsers (for opening and saving files) on Windows and macOS. (Yes, it is a 3rd party library, but it’s much easier to illustrate the problem with it.)
On macOS in particular, calling any of the dialogs and then confirming or cancelling the dialog will cause this error in Unity:
We currently suspect that this may happen because entering/exiting the native dialog (which freezes the Unity player) will trigger a redraw in Unity while it is already running the PlayerLoop. Of course we could be wrong.
To our knowledge, this didn’t happen on Unity 2017.4.11f1, which we were using before in our project. This happens in Unity 2019.2.15f1 and 2019.2.12f1.
There is another recent thread that reports the same problem for Windows, but using Unity 2017.
I submitted this as a bug (case 1204399) but I’m attaching the project here along with the reproduction steps:
- Build the project for macOS, development build.
- Run it and wait one second for the dialog to appear.
- Cancel it.
- See the error appear.
Does anyone have a workaround for this problem? Thanks!