- Home /
Question by
carpentermanas · Jun 07, 2021 at 06:00 AM ·
editorbug
Cursor lock state locked not locking the cursor in center
When I use cursor.lockstate = cursorlockmode.locked doesn't lock it to the center it makes the cursor invisible but the cursor moves in the editor it hovers over the application like you can press close ,minimise etc when I press escape key it shows the cursor and it is not working it is working in unity 2018.4 but not in unity 2020.3.10 please help me
Comment
Answer by SoulBlaze06 · Jun 10, 2021 at 04:36 PM
Yes, It is because Cursor.LockState("Locked") only locks the cursor inside the game and since in the editor ....your game is only limited to the gameview scene so if you tried to slide your cursor more than the gameview screen , then the cursor will eventually come out
Your answer
![](https://koobas.hobune.stream/wayback/20220613034706im_/https://answers.unity.com/themes/thub/images/avi.jpg)