OnAttach in derived class is never called

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

  • You can't do that. You can for example do something like this.
    BattleUnit where T : IBattleUnitState
    and then Zombie : BattleUnit
Sign In or Register to comment.