- Home /
Lock and hide the mouse within Unity while adjusting view
I come from a background of editing levels for games like Quake, Half-Life, Unreal, etc.
In the editors for those games, when you are moving the camera in your scene view, the mouse cursor goes invisible and is locked where ever you last left the mouse.
Is there a way to reproduce this functionality within Unity?
I find it incredibly annoying to have the mouse always end up in some random location after performing a quick adjustment on the scene camera view. It's also very distracting, as you can't help but pay attention to where the mouse ends up so you can find it when you are done.
Welcome!
I'm not sure if there's an option for that, unfortunately. From what I can see, Unity's editor controls are largely modeled after 3D modeling software like $$anonymous$$aya or Blender.
If you hold down right-click in the scene view, you can move around the scene using WASD (think of typical FPS controls). $$anonymous$$aybe not a huge help, but it's handy sometimes.
Screen.showCursor = false; // For hiding cursor
Screen.lockCursor = true; // For Lock cursor
Where do I use that code such that it effects the Unity scene view interface itself?
$$anonymous$$y question is for when you adjust the 'scene' view, not the game view.
Thanks, I always use WASD.
$$anonymous$$aybe I will post this as a feature suggestion.
Your answer
Follow this Question
Related Questions
How to assign references from scene view? 1 Answer
Adjusting the scene view camera speed/acceleration 0 Answers
How do i bring back the GUI option in the scene view 0 Answers
Pop up text from Floating text positioner interface c# 0 Answers
How to make multiple UI buttons clickable (or in this case tapable) at once. 0 Answers