|
Post by mayor072 on Nov 23, 2017 15:58:38 GMT
if you make a script . that when you press the ( esc) key , the cursor disappears , it will disappear in the inventory menu to make it disappear when the inventory is closed ? I'm a noob
---------------------
to do so , that s the cursor was only in the inventory , but not in the game
|
|
|
Post by mayor072 on Nov 24, 2017 16:21:50 GMT
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class ShowCursor : MonoBehaviour {
// Use this for initialization void Start () {
} // Update is called once per frame void Update () { if (Inventory_ShooterMelee) { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; } else { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } } }
|
|
|
Post by Invector on Nov 24, 2017 21:47:45 GMT
There is no need to create 2 threads with the same question mayor072 You can follow the example of the ShooterMelee demo scene, and call the Event ShowCursor of the ShooterMeleeInput in the OnOpenCloseInventory.
|
|
|
Post by mayor072 on Nov 24, 2017 22:28:31 GMT
There is no need to create 2 threads with the same question mayor072 You can follow the example of the ShooterMelee demo scene, and call the Event ShowCursor of the ShooterMeleeInput in the OnOpenCloseInventory.
you can just write how to lock the cursor in game without my script ? I saw the video you had no cursor in the game , but he was in the inventory
|
|
|
Post by Legion on Nov 25, 2017 5:56:53 GMT
There is no need to create 2 threads with the same question mayor072 You can follow the example of the ShooterMelee demo scene, and call the Event ShowCursor of the ShooterMeleeInput in the OnOpenCloseInventory.
you can just write how to lock the cursor in game without my script ? I saw the video you had no cursor in the game , but he was in the inventory [ More resolution] The cursor will be displayed at the beginning of the runtime, but once you open the inventory for the first time, it will stop showing when you close it and it will only appear in this window. Note: If you use Melee version, you will see "vMeleeCombatInput" instead of "vShooterMeleeInput".
|
|
|
Post by mayor072 on Nov 25, 2017 11:38:29 GMT
you can just write how to lock the cursor in game without my script ? I saw the video you had no cursor in the game , but he was in the inventory [ More resolution] The cursor will be displayed at the beginning of the runtime, but once you open the inventory for the first time, it will stop showing when you close it and it will only appear in this window. Note: If you use Melee version, you will see "vMeleeCombatInput" instead of "vShooterMeleeInput". thank you Oh great master of the cursor
|
|