In Unity3D, when you hit play, by default, it switches to the full 'Game' view which is great for previewing and such, but sometimes we just want to see our results in the 'Scene' view since we don't have to worry about setting up all the lighting, materials, etc.
Now we know we can simply create a new layout that shows both the 'Game' and the 'Scene' tabs at the same time, and that's what we're doing so we can continue to look at the 'Scene' tab when we start. However, we just don't want to see the 'Game' tab at all. Love to just hide it until we need it later.
Can this be done?
Pressing the “F” key after selecting a game object in the hierarchy or scene window will focus that object in the center of the scene view.
Scene View NavigationHold the right mouse button to enter Flythrough mode. This turns your mouse and WASD keys (plus Q and E for up and down) into quick first-person view navigation. Select any GameObject and press the F key. This will center the Scene View and pivot point on the selection.
Use Flythrough mode to navigate the Scene View by flying around in first-person, similar to how you would navigate in many games. Click and hold the right mouse button. Move the view around using the mouse, the WASD keys to move left/right/forward/backward, and the Q and E keys to move up and down.
Place this component on any GameObject and set the KeepSceneViewActive
field to true
.
using UnityEngine;
using System.Collections;
public class KeepSceneAlive : MonoBehaviour
{
public bool KeepSceneViewActive;
void Start()
{
if (this.KeepSceneViewActive && Application.isEditor)
{
UnityEditor.SceneView.FocusWindowIfItsOpen(typeof(UnityEditor.SceneView));
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With