0
Fixed

Loosing graph after maximize / minimize

Kjartan 3 years ago updated by William ianneci 3 years ago 7

Maximizing the graph view with "shift+space" seems to work well, but when I minimize the view the active graph disappears. 

I work on a laptop, so I often like to maximize the graph window with "shift+space" to get a more space to work. So when I loose the graph I have to go to the flow machine script and click the "edit graph" button every time it happens, and that gets tedious.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by Kjartan 3 years ago

oh, and I also seem to get this error message when I maximize / minimize:

NullReferenceException: Object reference not set to an instance of an object
Ludiq.Canvas`1[TGraph].HandleView ()
Ludiq.Canvas`1[TGraph].OnGraphGUI ()
Ludiq.GraphWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:285)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:278)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:245)

+1
Fixed in Alpha

Hi Kjartan, welcome to the community! :)

Fixed for next version. Unity was removing the reference to the window instance when resizing, I'm force-reassigning it back at every repaint and update.

Shift+Space is really awesome with Bolt! In the future I'd like a sidebar with the graph inspector and variables to automatically appear when in full screen mode. :)

Nice! Thanks for the fix and the quick reply Lazlo :)

Having access to the graph inspector and variables in full screen mode sure sounds handy.

Seems for me the issue persists, 

1. NullReferenceException: Object reference not set to an instance of an object

UnityEditor.IMGUI.Controls.TreeViewController.IsItemDragSelectedOrSelected (UnityEditor.IMGUI.Controls.TreeViewItem item) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:437)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, Int32 row, Single rowWidth, Boolean hasFocus) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:451)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (Int32 firstRow, Int32 numVisibleRows, Single rowWidth, Boolean hasFocus) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:621)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (Rect rect, Int32 keyboardControlID) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:552)
UnityEditor.SceneHierarchyWindow.DoTreeView (Single searchPathHeight) (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:582)
UnityEditor.SceneHierarchyWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:402)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:272)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:265)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:232)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

And, 

2. 

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Though previously they where a critical error and would hang the editor until a unit refresh or restart. Now they can be simply cleared. 

That does not seem like Bolt related code. Are you sure it's not from another plugin?

Hmm, you could be correct. It only appeared when Shift/Space on graph so assumed it was. I will have to take a closer look and confirm. Since it does not actually hang the editor any longer you are probably correct.

Seems to be sporadic now and cannot specifically pinpoint what is triggering it but does seem to happen outside Bolt and not seemingly an issue at the moment. I will update if I narrow it down.