Closed moshang closed 11 months ago
Some questions to try and understand what's going on:
Thanks for nudging me towards the right direction - not there yet, but getting closer.
I installed CsoundUnity on a second PC that didn't have Cabbage installed. The v3.4.0 package worked correctly in editor with the Basic Sample scene, and I confirmed that a IL2CPP arm64 build works correctly on my Pixel7 phone. Potentially the Csound version installed with Cabbage is not compatible with v3.4.0? The version of Cabbage I installed was the latest from their website v2.9.0.
After uninstalling Cabbage from the first PC, I confirmed that package v3.4.0 is now working correctly in the Unity editor, however the same build of Basic Sample scene is crashing on startup on my phone. Two differences here that may be important: the first PC is running Windows 10 with Unity 2022.3.10, and the second (that made the working Android build) is running Windows 11 with Unity 2020.3.45.
I just tried to build for Android on the latest Unity version (2022.3.10) and I can confirm the crash. I will investigate. It is working nicely on older Unity versions.
I found the issue, it is caused by Csound Params: https://github.com/rorywalsh/CsoundUnity/blob/470893372c06da09f7b5de5d1b3f3ed50e277f22/Runtime/CsoundUnityBridge.cs#L151 If I comment this line and lines 157-159 it builds and runs correctly. I will look into why those calls make the app crash on Android. Keep using older Unity versions for now.
Great, thanks a lot for looking into the issue and confirming.
fixed in version 3.4.1
Hi,
A heads-up that Unity crashes on play with the v3.4.0 package. I'm on Windows 10 and tested with Unity 2019.4.35 and Unity 2022.3.10. I tried installing the package from disk and by directly loading from Git in the package manager with the same result. The package v3.3.1 is working correctly for me (installing from disk).