Calling a c# script from js [for NGUI]

I’m attempting to update an NGUI UILabel with my playerHeath.

The health script is written in java and so I was trying to reference my c# script that updates the health on the user-interface.

function OnCollisionEnter (myCollision : Collision)
{
    	if (myCollision.gameObject.tag == "enemy")
    	{
		ApplyDamage(10);
    		var healthUpdate: HealthUpdate = GetComponent(HealthUpdate);
   		healthUpdate.Start();
   	}
}

I’m receiving The name ‘HealthUpdate’ does not denote a valid type (‘not found’).

First off ,its not written in Java. Unity does not support Java.

It might be written in Javascript which is something totally different. Don’t confuse the languages.

Secondly, in order to call a C# script from Javascript it must be in a folder whose compile order is before the folder the Javascript code is in.

See this article for compile order.