class Update extending

So i have a problem that I’m having is it’s not extending the Update function from the base class.

So here is the code.

Base class

public class Unit extends MonoBehaviour {
	public var health:float = 20;
	public var name_string:String = "";
	public var damage:AnimationCurve = new AnimationCurve.Linear(0,0,10,10);
	public var unitObj:GameObject;
	public var owner:User;
	public function Unit(){}
	public function Instantiate (health:float, name:String, damage:AnimationCurve, gameObject:GameObject){
		//constructor = parseFloat(health);
		this.name_string = name;
		this.damage = damage;
		this.unitObj = gameObject;
	public function Update(){
		Debug.Log('Update unit test');

And this the class that extend’s the other base class

public class Tank extends Unit {
	private var stance:String = "Agressive";
	public function Tank (health:float, name:String, damage:AnimationCurve, gameObject:GameObject){
		this.Instantiate( health, name, damage, gameObject );
	public function shoot (){}	
	public function changeStance ( stance:String ){
	 	this.stance = stance;
	 	return this;
	public function scan(){
		//scan for potental enemies
		print( 'start scan' );
	public function Update(){
		Debug.Log('Test Tank update loop');

So if i do new Tank( 32.2, ‘tank1’, AnimationCurve, gameObject’);

The update on the tank function wont run but the unit one will,

How can i get the Update function on the tank subclass to run everyframe?


Ah, figured it out an Static function like “Update” will only run if the extended class is also applied to an gameObject then that Update function will run