private void On2DModeChange()
{
if (this.m_2DMode)
{
this.lastSceneViewRotation = this.rotation;
this.m_LastSceneViewOrtho = this.orthographic;
this.LookAt(this.pivot, Quaternion.identity, this.size, true);
if (Tools.current == Tool.Move)
{
Tools.current = Tool.Rect;
}
}
else
{
this.LookAt(this.pivot, this.lastSceneViewRotation, this.size, this.m_LastSceneViewOrtho);
if (Tools.current == Tool.Rect)
{
Tools.current = Tool.Move;
}
}
HandleUtility.ignoreRaySnapObjects = null;
Tools.vertexDragging = false;
Tools.handleOffset = Vector3.zero;
}