Question by
OfficialLupaz · Feb 17, 2017 at 08:41 PM ·
javascriptmousecursor
Why won't my cursor show up??
So i want to show my cursor when i open my inventory (with tab) and when i close the inventory the cursor disappears . And i wrote a script for that but it doesnt work... what did i do wrong?
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;
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Why won't my cursor show up?? 1 Answer
MouseOver 1 Answer
Please help me with my mouse pointer 0 Answers
Making the cursor disappear after the mouse being inactive for a set amount of time? 0 Answers
Move mouse without moving cursor 0 Answers