Home > other >  Setting A switch to the roaming scenarios, and then switch back to the scene after A cursor
Setting A switch to the roaming scenarios, and then switch back to the scene after A cursor

Time:09-22

Scenarios by the cursor to select A menu, choose to enter different scene roaming, roaming scenarios for UNity3d's own first person controller, to roam from the scene A scene and then returned to the scene of A mouse cursor disappeared, added Screen. LockCursor=true; After the cursor, but only in the middle of the screen can't move, please help to solve it, is urgent!

CodePudding user response:

No one know, or met, code with Cursor. Visibke=true; Can display the cursor but still fixed in the middle of the screen,

CodePudding user response:

After unity5 Screen. LockCursor=true this API abandoned,
Use Cursor material instead,

Screen lock: the mouse Cursor. LockState=CursorLockMode. Locked;
Unlock screen mouse: Cursor. LockState=CursorLockMode. None;

Hope to adopt
  • Related