Forum rules - please read before posting.

Actionlist editor window bug

On Unity2018.3/AC 1.70/Windows toolbars bug out when the window is scaled up on a large screen.

Screenshot:
https://imgur.com/a/z1n8HwI

This causes the bottom toolbar and rightmost buttons to disappear.

Comments

  • Odd. I can't see how this might occur, though perhaps Unity itself has issues with this resolution. The screenshot suggests that the editor believes that the window is not as wide as it really is.

    As a test, open up /Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs, and paste the following into the top of the OnGUI function (around line 808):

    Debug.Log ("Window size: " + position.width + " x " + position.height + " (Canvas Width: " + CanvasWidth + ")");
    

    That should then display the window's pixel dimentions in the Console. Do they appear correctly, and update correctly as you move between a buggy size and non-buggy size?

  • Huh, after I started logging the dimensions, the bug disappeared! (The dimensions appeared to be correct when rescaling, however seemed to be reporting at half the resolution - might be a windows way of scaling the user interface to keep it from becoming too small). It's still working after I removed the Debug.Log and a restart, so I say that this magically fixed itself!

    PS: Maybe it's just me, but I really miss being able to just click a node connection to create an action. When working quickly with big actions it helps speed up the workflow.

  • I'll consider re-adding it - I did remove it as I felt it caused new nodes to be mistakenly added.

    I wonder if it wasn't the logging of the dimentions that resolved it, but your manually resizing of the window.

  • Thanks, but I did try resizing the windows, restarting Unity, closing and reopening the actionlist editor window. At once when the logging started, it looked normal. One of those wonderful Unity bugs :smiley:

  • Ouch, I spoke too soon. The bug keeps popping up now and again. I see I sometimes get an error in the log that I haven't seen before, not sure if this is helpful:

    ArgumentException: GUILayout: Mismatched LayoutGroup.repaint
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:311)
    UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8942)
    UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8926)
    UnityEditor.LabelGUI.OnLabelGUI (UnityEngine.Object[] assets) (at C:/buildslave/unity/build/Editor/Mono/Inspector/LabelGUI.cs:171)
    UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1053)
    UnityEditor.InspectorWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:696)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
    UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent () (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:412)
    UnityEngine.Experimental.UIElements.ImmediateStylePainter.DrawImmediate (System.Action callback) (at C:/buildslave/unity/build/Modules/UIElements/ImmediateStylePainter.cs:113)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:98)
    UnityEngine.Experimental.UIElements.VisualElement.Repaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at C:/buildslave/unity/build/Modules/UIElements/VisualElement.cs:862)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:310)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTreeChildren (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect textureClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:328)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:314)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.Update () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:35)
    UnityEngine.Experimental.UIElements.VisualTreeUpdater.UpdateVisualTree () (at C:/buildslave/unity/build/Modules/UIElements/VisualTreeUpdater.cs:70)
    UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:507)
    UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:230)
    UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

  • There's not much there in the way of clues.

    Does the bug pop up even when the earlier Debug.Log statement is used?

  • Yes, but it seems to be totally random. My Unity-UI-bug sense is tingling, but it's strange that this never happened in earlier versions of AC. There is a new Unity 2018 LTS release from last week, I might try to update to that and see how that goes.

  • I wouldn't hold your breath. Again: does the bug pop up even when the earlier Debug.Log statement is used?

    What is the behaviour of further resizing the window? Does the "cut off" point in the top toolbar remain in the same place, and does it somehow match the size of e.g. the Game window?

  • Yes, the bug pops up even when logging. When it happens, the top and bottom toolbar stay in place, and is gradually grayed out like in the screenshot - like they reach their maximum position. But it's very unreliable to reproduce - today it's been working without problems, so it's not a pressing issue.

  • I'm wondering if there's some correlation to the size of the game when playing - there does exist a Unity bug in that Editor window vs Game window co-ordinates can get mixed up.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.