I have some custom systems that I've integrated with the standard AC load/save mechanism (following the tutorial for creating custom Remember scripts). These scripts are working individually without any issue. However, I'm having the following problem:
When I have more than 1 remember script on a given object (in this case a hotspot) I am getting null reference exceptions when trying to load a saved game and some of my data is not getting resolved. For instance the Remember Hotspot and any of my custom Remember scripts. If I use just a single script I don't have this issue.
I'm not having an issue using two of your remember scripts (for instance, Remember Hotspot and Remember Collider) though.
Here is one of my scripts that is working by itself but throws a null reference at line 28 when any other Remember script is instantiated on the same object:
I'd appreciate any thoughts you have... again, working exactly as intended when it's by itself.
Comments
Debug.Log ("String loaded: " + stringData);
if (wireData != null) Debug.Log ("Found " + wireData.AllReactions.Count + " Reactions");
To fix, just insert this after the LoadScriptData call:
if (testData == null) return;
I'll update the save-data tutorial to include this requirement.