When adding points with P, they are way off.



  • Hi, I'm using SWS on a Mac, Unity 2018.3.6f1 and just imported SWS. When I add a new path, and press P to add items, they end up a lot to the left and up. The Waypoint Manager is at the Origin.

    Is there any reason or fix for this?



  • Hello,

    the Waypoint Manager casts a ray from the camera in the direction of your mouse cursor, in order to detect a collision, and places a new waypoint there. Are you sure that you don't have any colliders floating around, intersecting with the waypoint placement?

    Could you also try if this happens in one of the sample scenes shipped with SWS?



  • Same issue with me as well..

    here is the gif



  • @codecave same version though?

    There has been a bug in Unity 2017.x that calculated the mouse positions on Macs incorrectly. It could be re-introduced in those versions... can you also reproduce the issue with the latest release, Unity 2018.3.12? Since Unity 2018.4 is just around the corner, I'm going to check it with that version very soon.

    https://issuetracker.unity3d.com/issues/incorrect-mouse-position-when-running-in-full-screen-and-non-native-aspect-ratio



  • Hi, just installed 2018.3.12f1 and imported SWS into an empty project, and it's even worse, I can't add points at all. I get this error. Any ideas? :)

    NullReferenceException: Object reference not set to an instance of an object
    SWS.WaypointEditor.OnSceneGUI () (at Assets/SWS/Scripts/Editor/WaypointEditor.cs:62)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>: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 <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    UnityEditor.SceneView.CallOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2836)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2125)
    UnityEditor.SceneView.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1986)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>: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 <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at /Users/builduser/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 /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
    UnityEditor.DockArea.OldOnGUI () (at /Users/builduser/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 /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
    UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:541)
    UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
    UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
    UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
    UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    
    


  • Thanks for trying, in your log I can see that the experimental UIElements feature is invoked, namely:

    UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent

    I'm going to check that out too. Thanks for your patience



  • I have imported the latest version of SWS in both 2018.3.0 and 2019.1 projects and could not reproduce the placement issue.

    Is there any chance for exact repro steps for this? Have you tried resetting the layout in the editor (top right corner, select 'Default' layout) - and does the issue still occur?



  • You were right, it was related to the view, when I reset it to the default, it worked as it should. Weird, my setup is pretty easy so I can redo it, but how can it happen? After I rearranged the windows like I want them to be, it still works, so I guess that's great :)

    This was in 2019.1.0f2, but it probably works in the other version too, maybe. :)



  • I guess it happens when upgrading projects between Unity versions, some internal calculations could get corrupted...

    Nothing I could fix there, but glad it works out in the end :)


Log in to reply