Start and MonoBehaviour

I have the following class in unityscript:

#pragma strict

class Chain extends MonoBehaviour
{
	function Start():void
	{
		super.Start();
	}
}

This results in…

Removing the #pragma strict results in the code compiling. What’s up with that? Does UnityEngine.MonoBehaviour.Start exists as noted in the documentation or not? If super.Start should not be called why is it not indicated in the documentation?

Please advise.

Maybe Start is an abstract method that can be overridden in all subclasses.

Start, Update, … are not actually inherited. Unity does just some funky stuff to find out if any script that inherits from MonoBehaviour has a partucular function and calls it when needed. I would say that this is a suboptimal design decision they made long ago.

Thanks! I wish it were documented as such. This may have seemed like something that should have been immediately identifiable (I suspected some sort of abstract - but again it was not documented). This problem actually took me a while to discover because I was actually deriving class A from class B that was deriving from MonoBehaviour. In class B’s js file, I had not placed a #pragma strict so when I had attempted to add in an equivalent super.Start directly in class B it worked. Swearing ensued.

@Unity Development Team - please document which functions are abstract and that lacking strict will result in (what?) behavior.

You can submit a bug report for it. Unity sees documentation issues as bugs.