Input.GetKey* methods have overloads taking a KeyCode argument instead of a magic string. Those are safer and more efficient.
using UnityEngine;
class Camera : MonoBehaviour
{
public void Update()
{
if (Input.GetKey("q"))
return;
}
}Use KeyCode argument instead:
using UnityEngine;
class Camera : MonoBehaviour
{
public void Update()
{
if (Input.GetKey(KeyCode.Q))
return;
}
}A code fix is offered for this diagnostic to automatically apply this change.