Hi to all, I don’t understand this error… Before I have never had this problem… but today I’ve changed the script ‘Passi’ with another one… And I get this error… Someone can tell me why?
#pragma strict
private var showingCursor = false;
var scriptToControl : MouseLook;
var scriptToControl1 : CharacterMotor;
var scriptToControl2 : Passi;
function Start ()
{
Screen.showCursor = false;
showingCursor = false;
scriptToControl = GetComponent("MouseLook");
scriptToControl1 = GetComponent("CharacterMotor");
scriptToControl2 = GetComponent("Passi");
}
function Update () {
if(Input.GetMouseButtonDown(1)){
if(showingCursor == true){
Screen.showCursor = false;
showingCursor = false;
}
else if(showingCursor == false){
Screen.showCursor = true;
showingCursor = true;
}
//inizio disattivare script
if (scriptToControl.enabled)
scriptToControl.enabled = false;
else
scriptToControl.enabled = true;
//inizio disattivare script1
if (scriptToControl1.enabled)
scriptToControl1.enabled = false;
else
scriptToControl1.enabled = true;
//inizio disattivare script2
if (scriptToControl2.enabled)
scriptToControl2.enabled = false;
else
scriptToControl2.enabled = true;
//fine disattivare script
}
}