Unity - Script for rotate viewport by MMB like in Blender

I had a huge pain for my muscle memory, then trying to navigate in Unity’s Viewport. So I decided to make a script, that rotate the viewport (not in game) by MMB like Blender does. Here is my implementation of turntable, it is not completely accurate, but better than nothing.

EditorCameraRotateWithMMB.cs (1.4 KB)
(update: fix speed rotation inconsistency)

To use it, add folder “Editor” in Assets and put it here.

Surprised, but I can’t find similar in the web. Maybe, did I miss something?

1 Like