Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 23, 2017 21:14:05 GMT
I forgot how to do this, but how do I show the cursor in the game Invector? Ik default it doesn't show, how do I make it show on the screen?
|
|
|
Post by dreadlord on Feb 23, 2017 23:31:08 GMT
Have you tried Cursor.visible = true; ? Iam at work here and can't test this, sorry
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 24, 2017 0:12:32 GMT
Thank you dreadlord, I think that is it, what script is it in?
|
|
|
Post by dreadlord on Feb 24, 2017 0:20:36 GMT
the question is: where do you need the curser to show up? When the inventory is open or all the time?
And if you want the mouse curser to show up within the editor just press ESC
|
|
|
Post by sickscore on Feb 24, 2017 0:20:53 GMT
Thank you dreadlord , I think that is it, what script is it in? It's from UnityEngine namespace, just call "Cursor.visible = true"
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 24, 2017 1:31:57 GMT
Thanks Dude!!!
|
|
|
Post by mayor072 on Nov 23, 2017 18:55:49 GMT
Thank you dreadlord , I think that is it, what script is it in? It's from UnityEngine namespace, just call "Cursor.visible = true" and how to make the cursor was only in the inventory ?
|
|
|
Post by Legion on Nov 25, 2017 5:22:40 GMT
It's from UnityEngine namespace, just call "Cursor.visible = true" and how to make the cursor was only in the inventory ? If you take a look at vItemManager script in the inspector, there is a option on the bottom called "Open Events", you can use a boolean in "On Open Close Inventory" to show/hide your cursor in it. Edit: Ok, Invector wrote how here.
|
|
|
Post by Jader on Nov 25, 2017 18:51:02 GMT
I put this on vInventory Update:
if (isOpen){ Cursor.visible = true; Cursor.lockState = CursorLockMode.None; } else { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; }
|
|
|
Post by mayor072 on Nov 25, 2017 19:58:52 GMT
I put this on vInventory Update: if (isOpen){ Cursor.visible = true; Cursor.lockState = CursorLockMode.None; } else { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } tell me how to limit the laser from the gun to the object
|
|
|
Post by Jader on Nov 26, 2017 20:47:44 GMT
I think that you have to use Raycast and LineRenderer together.
Setting the start of line in the front of the gun and the end of line in the raycast hit point.
|
|