I have a question. So I am using Unity to make a game, and I have run across a problem. When I try to run this script I get an error saying "An instance of type 'UnityEngine.Event' is required to access non static member 'keyCode'." I am not sure what to do. Thanks! This is the code that is having the error also.
#pragma strict
var nothing = 0;
function Crosshair ()
{
if(Event.keyCode == 27)
{Screen.lockCursor = false;}
else if (nothing)
{Screen.lockCursor = true;}
}