PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
170 stars 55 forks source link

SceneView rotation is fixed to identity when in 2D mode. This will be an error in future versions of Unity. #30

Open bra1nDeaD opened 3 years ago

bra1nDeaD commented 3 years ago

I'm getting this warning when I have a 2D project open:

SceneView rotation is fixed to identity when in 2D mode. This will be an error in future versions of Unity. UnityEditor.SceneView:set_rotation (UnityEngine.Quaternion) SpaceNavigatorDriver.ViewportController:Fly (UnityEditor.SceneView,UnityEngine.Vector3,UnityEngine.Vector3) (at Assets/SpaceNavigator/Editor/ViewportController.cs:134) SpaceNavigatorDriver.ViewportController:Fly (UnityEditor.SceneView) (at Assets/SpaceNavigator/Editor/ViewportController.cs:108) SpaceNavigatorDriver.ViewportController:Update () (at Assets/SpaceNavigator/Editor/ViewportController.cs:80) UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

PatHightree commented 3 years ago

Thanks for reporting this, I would never have thought to test in a 2D project

SorraTheOrc commented 2 years ago

This is not limited to 2D projects. It is common, in Unity, to switch to 2D mode when working with UI in a scene. This error is thrown in this situation too. In Unity 2021 the error is:

SceneView rotation is fixed to identity when in 2D mode. This will be an error in future versions of Unity.
UnityEditor.SceneView:set_rotation (UnityEngine.Quaternion)
SpaceNavigatorDriver.ViewportController:Fly (UnityEditor.SceneView,UnityEngine.Vector3,UnityEngine.Vector3) (at Library/PackageCache/com.pathightree.spacenavigator-driver@2cd5a7cce6/Editor/ViewportController.cs:170)
SpaceNavigatorDriver.ViewportController:Fly (UnityEditor.SceneView) (at Library/PackageCache/com.pathightree.spacenavigator-driver@2cd5a7cce6/Editor/ViewportController.cs:130)
SpaceNavigatorDriver.ViewportController:Update () (at Library/PackageCache/com.pathightree.spacenavigator-driver@2cd5a7cce6/Editor/ViewportController.cs:100)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()