Overriding RichAI?

I’m seeing on the forum that the OnTargetReached function in RichAI should be overridable. I’m pretty new to the concept but I thought something like this would work:

using Pathfinding;
public class RichAICustom : RichPath {

public class AI : RichAI
{
    public override void OnTargetReached()
    {
        
    }
}

}

However I get an error of "cannot change access modifiers when overriding ‘protected’ inherited members ‘RichAI.OnTargetReached()’.

Is this just not possible based on how OnTargetReached is declared in the main class or am I missing something obvious?

Hi

The error says that you have to mark you method as ‘protected’ not ‘public’.
Also you do not need to subclass the RichPath class.