Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ECampese · May 01, 2021 at 11:14 AM · viewport

How do you switch between front, side, top, down view from keyboard

Hi guys.

How do you switch between different views in the viewport by using the keyboard? I know that you can use the gizmo axis, but to click over there every time is starting to be tidius. There is any other way to do so? In blender you can press numpad numbers for example..

Thank you.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Hellium · May 01, 2021 at 12:14 PM

The Shortcut Manager does not have this shortcuts, but you can add your very own ones very easily.


Create a new file called SceneViewShortcuts.cs and put it in an Editor folder under Assets. Copy-paste the following code in this file, and you will have several new shortcuts to do what you want:

 using UnityEngine;
 using UnityEditor;
 using UnityEditor.ShortcutManagement;
 
 public static class SceneViewShortcuts
 {
     [Shortcut("Scene View Camera - Top view", KeyCode.Keypad8)]
     public static void TopView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(90, 0, 0));
     }
 
     [Shortcut("Scene View Camera - Bottom view", KeyCode.Keypad2)]
     public static void BottomView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(-90, 0, 0));
     }
 
     [Shortcut("Scene View Camera - Right view", KeyCode.Keypad6)]
     public static void RightView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(0, -90, 0));
     }
 
     [Shortcut("Scene View Camera - Left view", KeyCode.Keypad4)]
     public static void LeftView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(0, 90, 0));
     }
 
     [Shortcut("Scene View Camera - Front view", KeyCode.Keypad7)]
     public static void FrontView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(0, 0, 0));
     }
 
     [Shortcut("Scene View Camera - Back view", KeyCode.Keypad1)]
     public static void BackView()
     {
         MakeSceneViewCameraLookAtPivot(Quaternion.Euler(0, 180, 0));
     }
 
     [Shortcut("Scene View Camera - Toggle ortho/persp view", KeyCode.Keypad5)]
     public static void ToggleOrthoPerspView()
     {
         SceneView sceneView = SceneView.lastActiveSceneView;
 
         if (sceneView == null) return;
 
         sceneView.orthographic = !sceneView.orthographic;
     }
 
     private static void MakeSceneViewCameraLookAtPivot(Quaternion direction)
     {
         SceneView sceneView = SceneView.lastActiveSceneView;
 
         if (sceneView == null) return;
 
         Camera camera = sceneView.camera;
         Vector3 pivot = camera.transform.position + camera.transform.forward * sceneView.cameraDistance;
         sceneView.LookAt(pivot, direction);
     }
 }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ECampese · May 01, 2021 at 12:23 PM 0
Share

Wow, thank you. Wonder why unity doesn't introduce this option natively... mh!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

162 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why does rotating via viewport give different values than inspector rotations? 2 Answers

Layered/slanted camera view 0 Answers

How can I change the viewport rect of two active cameras at runtime? - Splitscreen Multiplayer 1 Answer

Viewport affecting custom projection matrix 0 Answers

Keep object constrained to z space origin 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges