When a derieved mono class is a component, and the base class has an OnEnable(), gameobject.enabled is not sent in the initialization.
Anyone got more info on this?
If you have OnEnable/OnDisable in a child class, it seems to override the ones in the base class.
Edit: Solution
Rename them in the base class to “protected virtual void OnEnable()”
Then in your child classes use:
protected override void OnEnable()
{
base.OnEnable();
// Rest of code here.
}
And the same for OnDisable.