I managed to find a decent fix on our side and now everything appears to be working correctly as it was pre-upgrade. It's a small code change in AkWwiseXmlWatcher.cs. Details below:
- Unity: 2019.2.16f1
- Wwise version: 2019.2.2.7275
- Wwise integration: 2019.2.2.7275.1749
- macOS: Mojave 10.14.6
The constructor in AkWwiseXmlWatcher.cs starts a System.IO.FileSystemWatcher for xml files, and starts raising events before the path is set. When comparing the code pre and post upgrade, the older integration we had was setting the XmlWatcher.Path before setting XmlWatcher.EnableRaisingEvents to true, whereas the new one is doing it after. I don't know enough about the internals of how FileSystemWatcher works, so my hunch is that not setting a path starts a watcher on the whole filesystem(?) and therefore errors out with "too many files open" when trying to call AkBasePathGetter.GetPlatformBasePath(), which parse xmls to find the soundbank path. So the fix that worked for me is just to swap those two lines around so that they look like this:
XmlWatcher.Path = AkBasePathGetter.GetPlatformBasePath();
XmlWatcher.EnableRaisingEvents = true
After this change, everything seems to work smoothly for me again. Hope this helps someone els too! Maybe a question to Audiokinetic would be, was there a reason for that change? And have I inadvertently broken something else by doing it?
Edit: Just want to confirm the steps I took to apply this.
- Make sure working directory is clean (we use git for source control), and Unity is closed.
- Upgrade the wwise project first and generate soundbanks.
- Upgrade the Unity integration from the Wwise Launcher.
- Modify the code in AkWwiseXmlWatcher.cs before opening Unity (this might not be 100% needed, but it's how I did it)
- Finally open Unity and check that everything works. No extra directory creation or anything else needed.