Inheritance Issue

I have a script “abc” that inherits MonoBehaviour. In that script, I have an Awake() that executes fine.

I then have another script “def” that inherits “abc”. In that script I have an Update() and a Start(). The Update() executes fine, but the Start() does not.

Is there a reason this is the case, or is something going wrong?

Have you tried replacing Start() with OnEnable()?

Assuming you declared void Start() in both classes …

The link will tell you that when the parent and child class has declared the same function, you need to add keywords “virtual” and “override” to make sure instances of the child will call the child’s implementation of a function and not the parents.

OnEnable() works (and will be fine as a workaround).

I’m only declaring each method once: Awake() (in abc), Start() and Update() (in def). Everything works except Start().

There must be a reason for that… what’s different about Start()? Hmm…