new error in 2.2.17
Posted: Thu Jun 10, 2021 1:32 am
Here is a new error showing up in 2.2.17 where it didn't in 2.2.16:
This is most likely related to me changing scenes (via ) with Ink tags, so the LoadScene() is actually called while a conversation is still active.
Fun fact: It tries to call that twice, but adding code to check if we're already in the scene we try to switch to eliminates that problem. A full console log (with that minor issue still in place) is attached, if it helps.
The relevant Ink lines are just:
adding some dummy lin after the #location tag doesn't solve the issue.
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.ConversationStateSaver+<StartSavedConversation>d__6.MoveNext () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/ConversationStateSaver.cs:110)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PixelCrushers.DialogueSystem.ConversationStateSaver:ApplyData(String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/ConversationStateSaver.cs:80)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:654)
PixelCrushers.<LoadSceneCoroutine>d__107:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:765)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Code: Select all
PixelCrushers.SaveSystem.LoadScene()
Code: Select all
void OnPrepareConversationLine(DialogueEntry entry) {
if (myInk && myInk.activeStory) {
foreach (var tag in myInk.activeStory.currentTags) {
if (tag.StartsWith("location:")) {
string location = tag.Substring("location:".Length).Trim(' ');
if (debug) Debug.Log("ink tag switching to location \""+location+"\"");
MessageSystem.SendMessage(this, "SCENE_CHANGE", "", location);
}
}
}
}
The relevant Ink lines are just:
Code: Select all
"... some bla bla bla"
#location: map
-> END