resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

1.2.1 Works in 2018.2 Editor, but not built to Android (Cardboard) #48

Open sferrets opened 6 years ago

sferrets commented 6 years ago

It seems this bug might still exist, at least for me: https://issuetracker.unity3d.com/issues/android-ios-audiosource-playing-through-google-resonance-audio-sdk-with-spatializer-enabled-does-not-play-on-built-player

I added a highly metallic/reflective ResAudioRoom to my Cardboard project, and it works in the 2018.2Of2 editor. But built to Android (Nexus 5X device), the audio still sounds like standard audio.

I got this yellow (!) message during build: "Assets/ResonanceAudio/Scripts/ResonanceAudio.cs(405,26): warning CS0414: The private field `ResonanceAudio.roomPosition' is assigned but its value is never used"

Here is the line of code it refers to:

  // Pre-allocated position array for proxy room computation.
  private static float[] roomPosition = new float[3];

I'm not a programmer, so I don't know if this has to do with the issue. Could it be just one missing line of code somewhere causing this? Is there any workaround or addition to that script I can make to get ResAudio to work for Android Cardboard VR? Thanks - sferrets

UPDATE: I switched everything to the deprecated GVR Audio that came with Google VR SDK (1.150.0), and though it gives a lot of yellow error messages, the GVR Audio Room effects are heard built to the device! Seems I can make do with these old tools, but still hope Resonance can get fixed.