This is exactly why OnInit exists 🙂 That is because the agent is only correctly set right before the OnInit call, since it may have been overridden in the task inspector to be using a Blackboard Variable (instead of just “Self”). As such, in case of using a blackboard variable for the “agent”, we need to fetch the variable’s value right before the task is executed.
So, it’s really either OnValidate for things that are “agent agnostic”, or OnInit, for things that require the agent to already have been set.
Could you please share what you want to do more specifically?
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.