Hi,
I have been building a new version of my HoloATC app, and I noticed Spatial Sound not working properly. Usually it does not work at all (you don’t hear any sound), or it suddenly starts working after a while. Using my Unity File Logger service I discovered an error pointing to the SoundField package, so I started downgrading the package until it worked again, and found the issue starts here:
The log file of the not-working package just said this:
Time: 2025-03-01 10:46:04.794
Log: Exception
Msg: NullReferenceException: Object reference not set to an instance of an object.
StackTrace: MagicLeap.Soundfield.EventDispatcher:Update()
The log file of the older packages - that still produce Spatial Sound:
Time: 2025-03-01 10:46:04.794
Log: Exception
Msg: NullReferenceException: Object reference not set to an instance of an object.
StackTrace: MagicLeap.Soundfield.EventDispatcher:Update()=====
Time: 2025-03-01 10:46:04.802
Log: Warning
Msg: [MSA - Warning] No MLListener found, creating a temporary runtime instance with default settings. in function: CreateMLListenerInstance
StackTrace: UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
MagicLeap.Soundfield.MLListener:CreateMLListenerInstance()
MagicLeap.Soundfield.MLListener:CheckCreateInstance()
MagicLeap.Soundfield.d__3:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
MagicLeap.Soundfield.EventDispatcher:Update()=====
Time: 2025-03-01 10:46:04.809
Log: Log
Msg: [MSA] SDK/ZI audio is enabled, Audio will be routed through SDK/ZI
Am I doing something wrong, or is this a bug?
Using:
- Unity 6000.0.35f1
- OS 1.12.0
- SDK 2.6.0
- ML MRTK 1.4.0
- Developing on Windows