I would like to have a decorator update every frame – at the same frequency as the task it's decorating. But it looks like the Decorate function only updates when the child finishes execution, and OnUpdate isn't called on the decorator at all. What is the right way to do this?
C#:
namespace BehaviorDesigner.Runtime.Tasks
{
public class EnvQueryEvalDecorator : Decorator
{
public SharedEnvQuery envQueryRef;
public SharedGun gun;
public SharedBool evalResult;
public override TaskStatus Decorate(TaskStatus status)
{
evalResult.Value = envQueryRef.Value.IsCurrentPointGood(envQueryRef.Value.defaultEQSParams, gun.Value.checkVisibility);
return status;
}
}
}