Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[ProBuilder][Feedback] Holding 'v' key should snap vertex to vertex in vertex mode

Discussion in 'World Building' started by mostlyhuman, Feb 20, 2020.

  1. mostlyhuman

    mostlyhuman

    Joined:
    Mar 16, 2013
    Posts:
    53
    Just started using Probuilder today and was very surprised that holding the V key in vertex mode did not snap vertices to other vertices, unless i'm doing something wrong this just seems like the way it should work since unity works this way. I am trying to make a ramp from a cube and am trying to snap the upper vertex of each corner to the lower vertex so they are perfectly aligned. I realize I can probably put down a grid and snap to that but vertex to vertex snapping shoulder be an obvious feature. Thanks in advance for any future consideration.
     
  2. Nananaaa

    Nananaaa

    Joined:
    Jul 24, 2016
    Posts:
    31
    Vertex snapping seems to be broken in 2020.1.0b2 as well as in 2019.3.5f1.
     
  3. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    548
    It's working for me, what version of ProBuilder are you using?
     
  4. Ardinius

    Ardinius

    Joined:
    Oct 4, 2015
    Posts:
    55
    Also having an issue with Unity 2019.4.0f1 and probuilder 4.2.3 with vertex snapping. Note very new to using Probuilder so the fault could be with me, but creating a new shape and holding v fails to snap to any vertexs.
     
  5. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    548
  6. imaethan

    imaethan

    Joined:
    Dec 13, 2012
    Posts:
    7
    I'm having this issue with Probuilder on 2020.2.2f1 and Probuilder 4.4.0. Can't snap vertices and I get some error with the VertextManipluationTool script when I try to do so.

    Tried all the other available versions of probuilder and they all have the same problem.

     
    Last edited: Jan 25, 2021
  7. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    548
    I remember someone modified the function signature for FindNearestVertex recently, it may be that ProBuilder is still using reflection to access an outdated method. Can you file a bug report please? If you'd like PM me the ticket ID and I will look into it.
     
  8. WormyGels

    WormyGels

    Joined:
    Jun 26, 2019
    Posts:
    2
    I'm having this problem too, and it was slowing our workflow down. I looked into it myself a bit and came up with a hacky solution to get around it till ProBuilder gets fixed. Double click the error to open the script responsible in your script editor of choice. It should bring you to the "FindNearestVertex" method. Replace what is there with this:

    Code (CSharp):
    1. protected static bool FindNearestVertex(Vector2 mousePosition, out Vector3 vertex)
    2.         {
    3.             s_FindNearestVertexArguments = new object[] { null, null };
    4.             s_FindNearestVertexArguments[0] = mousePosition;
    5.  
    6.             if (s_FindNearestVertex == null) {
    7.                 // GetMethod() would be preferred but I couldn't get it to work, it only does this once so whatever.
    8.                 MethodInfo[] allMethods = typeof(UnityEditor.HandleUtility).GetMethods();
    9.  
    10.                 foreach (MethodInfo t in allMethods) {
    11.                     if (t.Name == "FindNearestVertex" && t.GetParameters().Length == 2) {
    12.                         s_FindNearestVertex = t;
    13.                         break;
    14.                     }
    15.                 }
    16.             }
    17.  
    18.             object result = s_FindNearestVertex.Invoke(null, s_FindNearestVertexArguments);
    19.             vertex = (bool)result ? (Vector3)s_FindNearestVertexArguments[1] : Vector3.zero;
    20.             return (bool)result;
    21.         }
    22.     }
    When you hit save and open up Unity again, the package cache is going to be invalidated and the script will revert back. I found I was able to go back and do it again and it stuck the second time (until you restart Unity). Obviously you aren't supposed to edit package scripts, but this is just a hacky work around till the official fix.
     
  9. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    687
    Is there going to be an update to ProBuilder soon to fix this? This is a pretty critical issue.
     
  10. ks51

    ks51

    Joined:
    Apr 22, 2013
    Posts:
    3
    Still broken in 2020.3.4f1
     
  11. jacob_unity943

    jacob_unity943

    Joined:
    Jan 19, 2021
    Posts:
    3

    Did this ever happen? Just upgraded Unity to 2020.3.9f1 and run into this issue, big workflow killer.
     
    happymoep likes this.
  12. Sneirox

    Sneirox

    Joined:
    Jun 25, 2013
    Posts:
    18
    the developers gave it up
     
  13. rredmond640

    rredmond640

    Joined:
    Feb 16, 2019
    Posts:
    1
    This worked! Thank you
     
  14. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    687
    @kaarrrllll Is Probuilder still alive? Could you implement the fix above? Thanks.
     
  15. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    548
    This was already fixed with ProBuilder 5.x, which is available as an update in Package Manager.

    Looks like no-one filed a bug report for original issue, so I went ahead and opened one to backport the change.
     
    jRocket likes this.
  16. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    548
    jRocket likes this.
  17. VirtualDestructor

    VirtualDestructor

    Joined:
    May 3, 2014
    Posts:
    40
    Do we have an ETA of when the 4.5.3 update will be pushed?

    It's too high risk for me to update from Unity 2020 to 2021 at the moment so I can't use ProBuilder 5.
     
  18. JustinAHS

    JustinAHS

    Joined:
    Feb 18, 2013
    Posts:
    33
    4.5.3 update still not pushed?
     
  19. NAGELLd

    NAGELLd

    Joined:
    Mar 23, 2020
    Posts:
    2
    Just get 5.0
     
  20. riley_grav

    riley_grav

    Joined:
    Jul 19, 2018
    Posts:
    1
    Rezzing this thread to say that I was able to use the git URL in the package manager to add the 4.5.3 version to my Unity 2020 and this feature works again for those who cant upgrade their engine to 2021. Additionally you can manually edit the manifest.json and put the git URL in there and it should do the same thing.
     
  21. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    126
    Probuilder is garbage of the highest order. This is a true fact.