Hello,
When I gather text it gives me a null reference exception. When I trace it with adding
Debug.Log(prefix + "_" + action.name); on line 2926 it shows me the actionlist it is caused.
When I check that action I see it has an id assigned by the speech manager.
when I delete that action and recreate it continues to another actionlist and is stuck there. It would take forever to recreate all the action lists.
(actions are inscene interaction/cutscene, not actionlist asset)
do you have any idea/suggestion?
ac version: 1.70.4
unity:2019.3.7f1
thanks
NullReferenceException: Object reference not set to an instance of an object
AC.SpeechManager.SetOrderIDs (System.Collections.Generic.List`1[T] actions, System.String actionListName, System.Int32 hashCode) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2926)
AC.SpeechManager.ProcessActions (System.Collections.Generic.List`1[T] actions, System.Boolean onlySeekNew, System.Boolean isInScene, System.Int32 tagID, System.String actionListName, System.Int32 hashCode) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2915)
AC.SpeechManager.ProcessActionList (AC.ActionList actionList, System.Boolean onlySeekNew) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2880)
AC.SpeechManager.GetLinesInScene (System.String sceneFile, System.Boolean onlySeekNew) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:1833)
AC.SpeechManager.PopulateList (System.Boolean currentSceneOnly) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:1450)
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
This looks to be a duplicate of this issue.
I will be addressing this in the next update - but that thread offers a temporary solution in the meantime.
NullReferenceException means that you are trying to use a reference variable whose value is Nothing/null . When the value is Nothing/null for the reference variable, which means that it is not actually holding a reference to an instance of any object that exists on the heap.
string str = null;
str.ToUpper();
Above c# code throws a NullReferenceException at the second line because you can't call the instance method ToUpper() on a string reference pointing to null. So, check your code once again.