Post by TOODX on May 14, 2014 8:54:16 GMT
Very frequently, but not every single time, when I transition to a scene I have setup with a Master Audio Prefab having its sounds loaded by a DynamicSoundGroupCreator, I'll get an error logged out:
There is no Master Audio prefab in this Scene. Subsequent method calls will fail.
UnityEngine.Debug:LogError(Object)
MasterAudio:get_Instance() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4409)
MasterAudio:get_GroupBuses() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4355)
MasterAudio:GetBusIndex(String, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2611)
MasterAudio:DeleteBusByName(String) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2936)
DynamicSoundGroupCreator:RemoveItems() (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:93)
DynamicSoundGroupCreator:OnDisable() (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:70)
NullReferenceException: Object reference not set to an instance of an object
MasterAudio.get_GroupBuses () (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4355)
MasterAudio.GetBusIndex (System.String busName, Boolean alertMissing) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2611)
MasterAudio.DeleteBusByName (System.String busName) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2936)
DynamicSoundGroupCreator.RemoveItems () (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:93)
DynamicSoundGroupCreator.OnDisable () (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:70)
If I continue playing, all the audio will work as expected. No issues with the game. But, I'm concerned about this error. Is there something I may have set up incorrectly with my scene? Maybe it's a race condition with loading the Dynamic group before the prefab? The prefabs exist in the scene and I'm not generating them at runtime, so I'm not sure what's going on here.
There is no Master Audio prefab in this Scene. Subsequent method calls will fail.
UnityEngine.Debug:LogError(Object)
MasterAudio:get_Instance() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4409)
MasterAudio:get_GroupBuses() (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4355)
MasterAudio:GetBusIndex(String, Boolean) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2611)
MasterAudio:DeleteBusByName(String) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2936)
DynamicSoundGroupCreator:RemoveItems() (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:93)
DynamicSoundGroupCreator:OnDisable() (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:70)
NullReferenceException: Object reference not set to an instance of an object
MasterAudio.get_GroupBuses () (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:4355)
MasterAudio.GetBusIndex (System.String busName, Boolean alertMissing) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2611)
MasterAudio.DeleteBusByName (System.String busName) (at Assets/DarkTonic/MasterAudio/Scripts/Singleton/MasterAudio.cs:2936)
DynamicSoundGroupCreator.RemoveItems () (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:93)
DynamicSoundGroupCreator.OnDisable () (at Assets/DarkTonic/MasterAudio/Scripts/Utility/DynamicSoundGroupCreator.cs:70)
If I continue playing, all the audio will work as expected. No issues with the game. But, I'm concerned about this error. Is there something I may have set up incorrectly with my scene? Maybe it's a race condition with loading the Dynamic group before the prefab? The prefabs exist in the scene and I'm not generating them at runtime, so I'm not sure what's going on here.