Hi,
I'm getting some errors when trying to load certain scenes. I ran a build of each scene individually so it would be easier for me to test things out and the errors only happen on 2 of my 7 scenes. The scene loads and the sound works, the art assets seem to load fine too, but I don't have access to any menus or my cursor. I'm on AC 1.54b and Unity 5.4.1
I get about 100 rounds of the error listed below:
NullReferenceException: Object reference not set to an instance of an object
at AC.ActionList.Awake () [0x00000] in <filename unknown>:0
Followed by one instance of this error:
NullReferenceException: Object reference not set to an instance of an object
at AC.AdvGame.AssignMixerGroup (UnityEngine.AudioSource audioSource,
SoundType soundType, Boolean isSpeech) [0x00000] in <filename
unknown>:0
at AC.Sound.Initialise () [0x00000] in <filename unknown>:0
at AC.Sound.Awake () [0x00000] in <filename unknown>:0
Those two errors loop through several times and then I get the error below towards the end:
NullReferenceException: Object reference not set to an instance of an object
at AC.PlayerCursor.OnApplicationQuit () [0x00000] in <filename unknown>:0
Hope someone can help.
Thanks,
Jason
Comments
The errors do not occur in the Editor, only in the builds. After doing a dev build the errors look like this:
NullReferenceException: Object reference not set to an instance of an object
at AC.AdvGame.AssignMixerGroup (UnityEngine.AudioSource audioSource, SoundType soundType, Boolean isSpeech) [0x00000] in Z:\Apps\TheSearch_App\Unity\5\TheSearch_2_2015\Assets\AdventureCreator\Scripts\Static\AdvGame.cs:71
at AC.Sound.Initialise () [0x0009c] in Z:\Apps\TheSearch_App\Unity\5\TheSearch_2_2015\Assets\AdventureCreator\Scripts\Logic\Sound.cs:84
at AC.Sound.Awake () [0x00000] in Z:\Apps\TheSearch_App\Unity\5\TheSearch_2_2015\Assets\AdventureCreator\Scripts\Logic\Sound.cs:58
NullReferenceException: Object reference not set to an instance of an object
at AC.ActionList.Awake () [0x00000] in Z:\Apps\TheSearch_App\Unity\5\TheSearch_2_2015\Assets\AdventureCreator\Scripts\ActionList\ActionList.cs:81
NullReferenceException: Object reference not set to an instance of an object
at AC.PlayerCursor.OnApplicationQuit () [0x00000] in Z:\Apps\TheSearch_App\Unity\5\TheSearch_2_2015\Assets\AdventureCreator\Scripts\Controls\PlayerCursor.cs:861
The art assets and sounds are the main differences between the scenes. There are no custom scripts or Actions I'm using. I deleted my OnStart action, but still get those errors. I can try to dig around some more to see if something else looks off.
Thanks
Everything you mentioned is there. I did another build that links three scenes together, one that works is the starting scene and the following 2 are the "broken scenes". Oddly enough, the broken scenes works fine when I build it this way. These scenes would be linked together in the final build anyway, which was my main concern, so this isn't an issue anymore. Thanks for your time!
-Jason
I had to tackle this issue again since I was getting the same errors on my titlescreen scene, but after digging around some more I saw that I didn't have my ManagersPackage assigned in the GameEngine prefab for any of the scenes. Once I assigned the package everything works as it should. Not sure why some scenes would still work even though the manager package asset wasn't assigned and some wouldn't.
Thanks again,
Jason