Editor Camera Orthograpric Control

The camera component has a boolean called orthographic. It is used to either have the camera be in perspective or orthographic mode. I'm attempting to change this bool during editor mode, not during runtime. And we know that we can somewhat access the editor's scene view camera via Camera.current or SceneView.lastActiveSceneView. So far we can access and set, the camera's rotation like this: SceneView.lastActiveSceneView.rotation = Quaternion(...), and the position like this: SceneView.lastActiveSceneView.pivot = Vector3(...). However, I don't know how to access the orthographic bool for the life of me. When I access the camera, it is read-only, so current.camera and SceneView.lastActiveSceneView.camera is fail. Does anyone have any insight on this? Thanks ahead of time.

In the top right corner of the scene view there is a gizmo that shows the three axes of dimensional space. Under it you currently see "Persp", which means your scene view camera is in perspective. If you click on any of the cones in the gizmo, the camera will switch rotate to look from that direction and it will switch from "Persp" to "Iso", short for "Isometric" which is an orthographic projection. You can hold and drag the right mouse button to change the orthographic view's direction, and you can click on the cube at the center of the gizmo to return to "Persp".

This is waaaay too late to answer now, but in case anyone else might need it, it’s “just”

SceneView.lastActiveSceneView.orthographic = boolYouNeed;

This might be a complete example.

using UnityEngine;
using UnityEditor;

public class SceneViewNavigation : MonoBehaviour
{
	[MenuItem("Navigation/Top View")]
	static void TopView()
	{
		SceneView.lastActiveSceneView.rotation = Quaternion.Euler(90f, 0f, 0f);
		SceneView.lastActiveSceneView.pivot = new Vector3(0f, 0f, 0f);
		SceneView.lastActiveSceneView.size = 10f; // unit
		SceneView.lastActiveSceneView.orthographic = true; // or false
	}
}

Here is an asset I made that saves camera views and also if it’s orthographic or in 2d mode, it’s pretty simple to use and it comes with the source code:

Camera.main.orthographic = true;

Source: http://unity3d.com/support/documentation/ScriptReference/Camera-orthographic.html