Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEditor;
- public class SceneViewHelper : Editor
- {
- [MenuItem("Custom/Scene View/Match main camera %#M")]
- static void MatchMainCamera()
- {
- var camera = GameObject.FindWithTag("MainCamera");
- if (camera != null)
- {
- SceneView.lastActiveSceneView.AlignViewToObject(camera.transform);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement