Preconditions can also be set via code, this is a pattern I have not had to use but I added in because I assumed some programmers would like to stay in the code.
By practice, Action.IsPreconditionsMet is not overridable and relies on the inspector.
If you want to modify the precondition at runtime, override the IsProceduralPreconditionMet method.
The current state passed through is basically the agent's train of thoughts. It is passed by the planner while conducting plans. (i.e if you're debating in your mind such as "someone knocked the door, if I go to open it, there might be a dangerous person there", this state is the currentState).
public class FooAction : Action
{
public bool AlwaysPass;
public override bool IsProceduralPreconditionMet(Dictionary<string, float> currentState)
{
return AlwaysPass;
}
}