OnAttach in derived class is never called

Options
I have 2 class like below:

Class Base : Bolt.EntityBehaviour
{
public override void Attached()
{
}
}

Class Derived : Base
{
public override void Attached()
{
// This function is never called
}
}

If the Derived class is attached on a GameObject in my Scene, then the Attached() is never called.
If the Base class is attached to the same GameObject, then Base.Attached() is called as expected. Why?
Is there anything wrong I made? Thank you.

Comments

  • stanchion
    Options
    You can't do that. You can for example do something like this.
    BattleUnit where T : IBattleUnitState
    and then Zombie : BattleUnit