DrawRay with a custom class.

I have 2 simple scripts witch have to dray a ray from an objects position upwards but it dosent do anything,

–the class witch draws the ray

#pragma strict

class aClass
{
	
	var pos : Transform;
	
	function Update()
	{
		if(pos != null)
		{
			Debug.DrawRay(pos.position,Vector3(0,10,0), Color.red);
		}
	}


}

–the script witch sets the transform

#pragma strict



var grid : aClass = new aClass();



function Start () 
{
	grid.pos = gameObject.transform;
}

The scripts are rather simple but it dosent work and it dosent have any warnongs or errors.What am I doing wrong?

Where is grid.Update() called? It looks like aClass isn’t a MonoBehaviour so Unity will not automatically call it’s Update() function. So unless your second script which sets the transform is also calling grid.Update() in it’s own Update() function, then Debug.DrawRay is never getting called.