Question by
OfficialLupaz · Feb 19, 2017 at 10:48 PM ·
javascriptmousecursormouseclick
Why won't my cursor show up??
Got a problem... Again! So i'm following this tutorial: https://www.youtube.com/watch?v=qrz_bQOh-tw&t=13s but at the end of the video his cursor shows up when you open your inventory. but mine doesn't? i did exactly what he did but here is my code anyway:
var OurInventory : GameObject;
var InvStatus : int;
function Update () {
if (Input.GetButtonDown("Inventory")) {
if (InvStatus == 0) {
InvStatus = 1;
Screen.lockCursor = false;
OurInventory.SetActive(true);
}
else {
OurInventory.SetActive(false);
InvStatus = 0;
Screen.lockCursor = true;
}
}
}
Can someone help me please?
Comment
Answer by $$anonymous$$ · Feb 20, 2017 at 02:15 AM
Have you tried Cursor.visible = true inside the if statement and Cursor.visible = false inside the else statement? That should work
Your answer
Follow this Question
Related Questions
Mouse Cursor Problems,PLEASE HELP ME,I have cursor problems 0 Answers
Why won't my cursor show up?? 0 Answers
Limited response from mouse input in game view. 2019.3 0 Answers
Mouse Cursor is flashing 0 Answers
SetCursor image not same mouse click 0 Answers