I moved across to Unity 2020 a while ago and this has been something that’s been annoying me a lot. When I’m in vertex/edge selection mode I can’t snap to other vertices when holding V. I get the following error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ProBuilder.VertexManipulationTool.FindNearestVertex (UnityEngine.Vector2 mousePosition, UnityEngine.Vector3& vertex) (at Library/PackageCache/com.unity.probuilder@4.5.0/Editor/EditorCore/VertexManipulationTool.cs:404)
UnityEditor.ProBuilder.PositionMoveTool.DoTool (UnityEngine.Vector3 handlePosition, UnityEngine.Quaternion handleRotation) (at Library/PackageCache/com.unity.probuilder@4.5.0/Editor/EditorCore/PositionMoveTool.cs:66)
UnityEditor.ProBuilder.VertexManipulationTool.OnSceneGUI (UnityEngine.Event evt) (at Library/PackageCache/com.unity.probuilder@4.5.0/Editor/EditorCore/VertexManipulationTool.cs:271)
UnityEditor.ProBuilder.ProBuilderEditor.OnSceneGUI (UnityEditor.SceneView sceneView) (at Library/PackageCache/com.unity.probuilder@4.5.0/Editor/EditorCore/ProBuilderEditor.cs:698)
UnityEditor.SceneView.CallOnSceneGUI () (at <433cbae83977409887e43d50043210d2>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <433cbae83977409887e43d50043210d2>:0)
UnityEditor.SceneView.OnGUI () (at <433cbae83977409887e43d50043210d2>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <433cbae83977409887e43d50043210d2>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <433cbae83977409887e43d50043210d2>:0)
UnityEditor.DockArea.OldOnGUI () (at <433cbae83977409887e43d50043210d2>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at :0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at :0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at :0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)
1 Like
Did you ever find the solution for this?
I just ended up changing unity version to 2021.2.15f1 and Probuilder 5.0.4. Doesn’t seem to be an issue anymore.