I am trying to set The Scene view to be in 2d mode with an editor script.
i can read the state on the sceneview with:
SceneView.lastActiveSceneView.in2DMode;
not problem, no errors! But if i try to Set it i get the following error!
Any clues?
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Tools.get_viewToolActive ()
UnityEditor.Tools.get_viewTool ()
UnityEditor.SceneView.set_in2DMode (Boolean value)
Thanks in advance!