ActionTasks only get an Update callback for performance while FixedUpdate or LateUpdate callbacks should be manually registered if need so.
Here is example of how to do that:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
usingUnityEngine;
usingNodeCanvas.Framework;
usingParadoxNotion.Design;
usingParadoxNotion.Services;
namespaceNodeCanvas.Tasks.Actions{
publicclassFixedUpdateExample:ActionTask{
protectedoverridevoidOnExecute(){
MonoManager.current.onFixedUpdate+=OnFixedUpdate;
}
protectedoverridevoidOnStop(){
MonoManager.current.onFixedUpdate-=OnFixedUpdate;
}
voidOnFixedUpdate(){
Debug.Log("FixedUpdate");
EndAction();
}
}
}
Let me know if that works for you.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.