Query Tool Handle Rotation Button

I’m writing a custom editor for the Transform component that uses hotkeys to select the axis, and moving the mouse to actually translate the selected object on the selected axes. Similar to Bethesda’s Creation Kit.

Is there a way to query the state of these buttons in an editor script?
7547029--932641--upload_2021-10-4_23-9-47.png

Not sure if it still works, but there’s an undocumented Tools class in the UnityEditor namespace that has a static property for it. I think it was called pivotMode.

There is, in the UnityEditor.Tools class, on the Tools.pivotMode and Tools.pivotRotation properties.

@Rotary-Heart beat me to it, but it is no longer undocumented!

Nice, I’m glad to see it documented now!