NodeCanvas Forums › Support › Losing BB variables/references after compiling › Reply To: Losing BB variables/references after compiling
The behavior described above just changed a little bit after I relaunched Unity (5.3.5f1). Here is the detailed description :
1- I have a perfectly fine FSM window, everything is working. I introduced a small mistake anywhere in the code and CTRL-R to recompile.
2- The FSM Window completely disappears. If I go to Tools/ParadoxNotion in the Unity Menu bar, the submenu does not appear. If I go to the gameobject the FSM is attached to, I have the FSM Owner Component displaying only the script name (FSMOwner) and then a grayed out line with “Start Called” and an unchecked checkbox. The “Edit FSM” button is not present. The Blackboard component below displays the script name (Blackboard) and a line with “Serialized Blackboard” followed by a string. Third line is an empty Object Reference array.
3- Correcting the mistake and CTRL-R to recompile. First error thrown in the console :
NullReferenceException: Object reference not set to an instance of an object
1 2 3 4 |
[Exception] NullReferenceException: Object reference not set to an instance of an object 0. UnityEngine.UI.Graphic.OnRebuildRequested() at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:480 1. UnityEngine.UI.GraphicRebuildTracker.OnRebuildRequested() at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/GraphicRebuildTracker.cs:33 2. UnityEngine.CanvasRenderer.RequestRefresh() at C:/buildslave/unity/build/artifacts/generated/common/modules/UI/CanvasRendererBindings.gen.cs:314 |
Then more than 300 identical errors :
1 2 |
MissingReferenceException: The object of type 'Object' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. |
1 2 3 4 5 6 7 |
[Exception] MissingReferenceException: The object of type 'Object' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. 0. UnityEditor.Editor.IsEnabled() at C:/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:589 1. UnityEditor.InspectorWindow.DrawEditor() at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1151 2. UnityEditor.InspectorWindow.DrawEditors() at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028 3. UnityEditor.InspectorWindow.OnGUI() at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352 4. MonoMethod.Invoke() at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222 |
Then at the end, this single error :
Exception: Error while parsing: unable to parse; invalid token "="; context = <=null]]"}}}s":{"bb_CurrentBrain":{"_value":{},"_na>
1 2 3 4 5 6 |
[Exception] Exception: Error while parsing: unable to parse; invalid token "="; context = <=null]]"}}}s":{"bb_CurrentBrain":{"_value":{},"_na> 0. fsResult.AssertSuccess() at Assets/ParadoxNotion/NodeCanvas/Framework/_Commons/Runtime/Serialization/Full Serializer/fsResult.cs:147 1. fsJsonParser.Parse() at Assets/ParadoxNotion/NodeCanvas/Framework/_Commons/Runtime/Serialization/Full Serializer/fsJsonParser.cs:495 2. JSONSerializer.Deserialize() at Assets/ParadoxNotion/NodeCanvas/Framework/_Commons/Runtime/Serialization/JSONSerializer.cs:81 3. JSONSerializer.Deserialize[BlackboardSource]() at Assets/ParadoxNotion/NodeCanvas/Framework/_Commons/Runtime/Serialization/JSONSerializer.cs:61 4. Blackboard.OnAfterDeserialize() at Assets/ParadoxNotion/NodeCanvas/Framework/Runtime/Variables/Blackboard.cs:43 |
(bb_CurrentBrain is one of my BB variable)
4- The window is still missing. But if I click away in the hierarchy then click back to the gameobject owning the FSM, the FSM window then immediately pops up back on the screen, and the FSM is then working fine.
Thank you very much for taking the time to help me !