How to read the current PivotRotation or PivotMode ?

Hi there

How can I find out from code in an editor script, if the Global or Local PivotRotation is selected?

I searched some time now, but did not find something useful.

There’s a undocumented class in UnityEditor namespace called Tools. It has a static property pivotRotation, that returns a PivotRotation enum (Local or Global) and another one called pivotMode, that returns a PivotMode enum (Center or Pivot).

public class Tools : ScriptableObject
	public static ViewTool viewTool { get; set; }
	public static PivotMode pivotMode { get; set; }
	public static PivotRotation pivotRotation { get; set; }

	public static Vector3 handlePosition { get; }
	public static Quaternion handleRotation { get; set; }
	public static Quaternion handleLocalRotation { get; }