unity-game-enginegoogle-vrresonance-audio

Unity Editor crashes after loading, caused by Googles Resonance Audio


i was working on my VR App when unity suddenly crashed. I think it is caused by the Resonance Audio spatializer. Can anybody help me? This is the beginning of the Editor.log

Receiving unhandled NULL exception
Obtained 32 stack frames.
#0  0x00000125280a61 in SetListenerGain
#1  0x0000011e02491e in  (wrapper managed-to-native) ResonanceAudio:SetListenerGain (single) + 0xce (0x11e024850 0x11e02494d) [0x138493330 - Unity Child Domain]
#2  0x0000011e024705 in  ResonanceAudio:UpdateAudioListener (ResonanceAudioListener) + 0x105 (0x11e024600 0x11e02477f) [0x138493330 - Unity Child Domain]
#3  0x0000011e0244a7 in  ResonanceAudioListener:Update () + 0x77 (0x11e024430 0x11e0245c7) [0x138493330 - Unity Child Domain]
#4  0x0000011a73221a in  (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0xfa (0x11a732120 0x11a73234d) [0x138493330 - Unity Child Domain]
#5  0x00000137cda12e in mono_get_runtime_build_info
#6  0x00000137e05d56 in mono_runtime_invoke
#7  0x00000100ec1e0a in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, 
[...]

Solution

  • (see the corresponding GitHub issue for more information)

    The issue is caused by duplicate function definitions between the Resonance Audio SDK and the audio components in the GVR Unity SDK.

    As an immediate workaround, replacing the following lines in ResonanceAudio.cs#L391 and GvrAudio.cs#L385 as the line below should resolve the crashes in the Editor:

    #if !UNITY_EDITOR && UNITY_IOS

    Overall, it is strongly recommended to remove the audio related assets from the GVR Unity SDK when using together with the Resonance Audio SDK. Please see the corresponding section in the "Upgrading existing projects from Google VR audio components" guide for further information.