#pragma strict
var other : GameObject;
function Update ()
{
function OnMouseDown()
{
other.GetComponent.().Play();
}
}
#pragma strict
var other : GameObject;
function Update ()
{
function OnMouseDown()
{
other.GetComponent.().Play();
}
}
@Dog Gamer
Actually there are several problems with your script
Below is an example
#pragma strict
var other : GameObject;
function OnMouseDown()
{
if (other != null)
{
other.GetComponent(SpriteRenderer).enabled = true;
}
}
You wrote:
other.GetComponent.().Play();
It actually is:
other.GetComponent().Play(); //Without the dot after "Component"
I hope this solves your problem