Tasks are updating from within the BT update and not independently, unless you want to do so.
To make AI deterministic and anything really, FPS independent, you simply have to use Time.deltaTime where it is adequate, but it’s really your call how you want to handle this of course 🙂 FixedUpdate is really only there in Unity to be used with Physics :).
As for some code, from the next version, this is the only piece of code that is needed to manually update a BehaviourTree (owner) manually:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
publicclassExample:MonoBehaviour{
publicBehaviourTreeOwner BTOwner;
voidStart(){
//false autoUpdate, null callback
BTOwner.StartBehaviour(false,null);
}
voidUpdate(){
BTOwner.UpdateBehaviour();
}
}
Please let me know if you have any more questions.
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.