I’m working on an Editor Scripted Tool that I want to be able to snap when you hold Ctrl, just like the standard Unity transform tools. However, I can’t seem to find any documentation as to how to access the Snap Settings the User has specified. Does this functionality exist?
Any assistance is greatly appreciated. Thanks in advance.
Hey, I am also looking for this… Anyone knows about this?
I see unity recently added snap features: Unity - Scripting API: Snapping
But I still don’t know how to access the Editor’s “Grid And Snap” world grid size. (with Unity 2020).
Searched for this a bit, and this thread came up pretty high. Had to dig deeper to find the correct result, so for future googlers; the current way to get the snap settings is much cleaner:
In my case, It’s not the EditorSnapSettings.move that determines the snap of objects with the translate gizmos.
Instead it’s the World Grid’s size and I see this value is not accessible in the EditorSnapSettings.
I’m talking about when you move objects with this grid snap option toggled on.
So with these settings, objects you translate will snap every 1 unit, and not every 3 units as one might expect. What is EditorSnapSettings.move for?