blitzen
1
To align your editor’s scene window view to an axis, it is arduous to find the corresponding leg of the Scene Gizmo and click it with the mouse:

Are there keyboard shortcuts for the axes, akin to Numpad 1, 3, and 7 in Blender?
If not, how might one implement them with an editor script?
Couldn’t find any hotkeys myself, but it is possible to make a script to do it.
using UnityEngine;
using UnityEditor;
using System.Collections;
class GizmoTest {
[MenuItem ("Gizmo/Front View _1")]
static void FrontView () {
GetSceneView().orthographic = true;
GetSceneView().LookAtDirect(GetSceneView().pivot,
Quaternion.LookRotation(Vector3.forward));
}
[MenuItem ("Gizmo/Side View _3")]
static void SideView () {
GetSceneView().orthographic = true;
GetSceneView().LookAtDirect(GetSceneView().pivot,
Quaternion.LookRotation(Vector3.right));
}
[MenuItem ("Gizmo/Top View _7")]
static void TopView () {
GetSceneView().orthographic = true;
GetSceneView().LookAtDirect(GetSceneView().pivot,
Quaternion.LookRotation(Vector3.down));
}
[MenuItem ("Gizmo/Perspective View _5")]
static void PerspectiveView () {
GetSceneView().orthographic = !GetSceneView().orthographic;
GetSceneView().LookAtDirect(GetSceneView().pivot,
Quaternion.LookRotation(Vector3.forward + Vector3.right + Vector3.down));
}
static SceneView GetSceneView() {
SceneView activeSceneView = null;
if (SceneView.lastActiveSceneView != null) {
activeSceneView = SceneView.lastActiveSceneView;
}
else if (SceneView.sceneViews.Count != 0){
activeSceneView = (SceneView.sceneViews[0] as SceneView);
}
return activeSceneView;
}
}
This script will work on all the numbers of the keyboard, don’t know if there is any way to only check numpad.