Condition Decorator

Type description and basic instructions.

Description

Condition Decorator is base abstract class for all decorator nodes that are supposed to check ccertain condition when executed.

To create a custom condition decorator you should inherit from Condition Decorator class and implement logic that is described below.

CalculateResult

When inheriting from Condition Decorator you have to override CalculateResult method.

public class ExampleConditionDecorator : ConditionDecorator
{
    public override bool CalculateResult()
    {
        throw new NotImplementedException();
    }
}
  • CalculateResult calculates result of the condition.

  • CalculateResult gets called every tick during node execution.

Condition Decorator inherits from Decorator Node

To create custom decorator nodes in editor you should add Node Content attribute to your custom decorator node class.

Last updated