I would like to know how I can do to put two keys where it says “if (Input.GetKeyDown (KeyCode.Escape))” I would like that function to be activated with the E key and Escape
public class CurcorHideShow : MonoBehaviour
{
public bool isLocked = true;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
isLocked = !isLocked;
}
Cursor.lockState = isLocked ? CursorLockMode.Locked : CursorLockMode.None;
Cursor.visible = !isLocked;
}
}