my game can load sound files using the WWW class without issue on Windows & legacy Mac Intel CPUs.
I just upgraded from Unity 2019.4 to 2021.3 and now it doesn’t work with my 1st time building directly for the Apple Silicon target. (before the Apple M1 users were using Rosetta and it was working fine)
I have 2 users with M1 CPUs who have reported their Modded sounds not playing in my game. One user reported the sounds were working correctly if the game wasn’t Modded.
I don’t have an M1 CPU so I cannot test by myself.
I have no idea why it doesn’t work, and my only guess is that Unity didn’t implement the WWW class on the Silicon target, but I think it should have shown a warning or something, but maybe I just missed them.
Anyone would have any idea about this ?
Thanks in advance for any answer.
EDIT:
it turns out it fails also on my old Mac as well, so it’s not related to M1/Silicon. (I had only reports from M1 users, but I guess it just means there are not many non-M1 users on Mac anymore)
As it was working without any issue in the previous version of my game, this means something changed from Unity 2019 to Unity 2021 only on the Mac and not on Windows.
Hi @manutoo , it seems like I have exactly the same issue.
I tried adding the prefix “file://” or “file:///”, but it still doesn’t work (although it used to work when I used unity 2019. Now I use 2021).
Www is obsolete as you mentioned in the title, and the recommended way is to use UnityWebRequest:
using (UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(fullPath, AudioType.WAV)).
Although it works well on Windows and Android, it doesn’t work on Mac and iOS devices.
I opened a thread before I saw yours where I explain my issue in more details: