- Home /
Editor Script - Access the User's Snap Settings?
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?
Answer by Jake-L · Jul 17, 2013 at 12:08 PM
I asked me the same and found an answer (the more I work with Unity, the more I like IL Spy. It gives answers to the missing 5% of documentation ;)
Snap settings are stored in EditorPrefs and can be accessed using the following names:
MoveSnapX
MoveSnapY
MoveSnapZ
ScaleSnap
RotationSnap
Cheers
Jake
Thank you for letting us know about this! I couldn't find this info anywhere else. And now our community script SnapToGrid works how it suppose to :)