Class ConditionUtils
A utility class for conditions used in Conditional nodes.
Inherited Members
Namespace: Unity.Behavior
Assembly: Unity.Behavior.dll
Syntax
public static class ConditionUtils
Methods
Evaluate(object, BlackboardVariable<ConditionOperator>, object)
Evaluates the operation from a condition.
Declaration
public static bool Evaluate(object leftOperand, BlackboardVariable<ConditionOperator> conditionOperator, object rightOperand)
Parameters
Type | Name | Description |
---|---|---|
object | leftOperand | The left side value that is being compared. |
BlackboardVariable<ConditionOperator> | conditionOperator | The condition operator. |
object | rightOperand | The right side value that is being compared. |
Returns
Type | Description |
---|---|
bool | The result of the operation. |
Evaluate<CompareType>(CompareType, BlackboardVariable<ConditionOperator>, CompareType)
Evaluates the operation from a condition.
Declaration
public static bool Evaluate<CompareType>(CompareType leftOperand, BlackboardVariable<ConditionOperator> conditionOperator, CompareType rightOperand) where CompareType : unmanaged, IComparable
Parameters
Type | Name | Description |
---|---|---|
CompareType | leftOperand | The left side value that is being compared. |
BlackboardVariable<ConditionOperator> | conditionOperator | The condition operator. |
CompareType | rightOperand | The right side value that is being compared. |
Returns
Type | Description |
---|---|
bool | The result of the operation. |
Type Parameters
Name | Description |
---|---|
CompareType | The type of value being compared. This must be unmanaged IComparable. |