I am new to unity and scripting, and I want my Player objeect to enter another object called trigger, causing text to pop up. I am having trouble with this script, as it says my script doesn’t exist. Here is what I have
var OnControllerColliderHit = true //boolean
function Update ()
{
function OnControllerColliderHit(hit : ControllerColliderHit){
if(hit.gameObject.tag == "Trigger"){
showText.message = "HELLO WORLD";
showText.turnTextOn = true;
/*MenuGUI.showMenu = true;*/
}
}
}
I just want to get this code to work, but I cant see a problem.