Description

Serialized predicate ScriptableObject for ReturnGraph that can be configured in the inspector using a referenced IConditionEvaluator. Handles creating input ports for the IConditionNode referencing this condition.

Properties

Property Description
Evaluator Represents the evaluator interface used to define the input ports of an IConditionNode and handle runtime evaluation of a condition. The field is marked with the SubclassSelectorAttribute from MackySoft's SerializeReference Extensions, which allows users to select child types of this interface in the inspector from a dropdown menu.

Methods

Method Description
DefineInputPorts Defines the input ports for a node within the graph based on the provided context using the referenced Evaluator.
GetInputPortValues Retrieves a list of ‣ values for the specified nodes by evaluating variable and constant input ports.

Static Methods

Method Description
CreateInputPortConstant<T> Creates an ‣ from a port's value. If the port is connected to a variable node, an RgInputPortVariableKey is created with the variable node's name. Otherwise, an RgInputPortConstant is created with the value of the port referenced.

Example

An RgCondition asset with a ‣ referenced. The Evaluator dropdown menu is drawn using MackSoft’s SerializeReference Extensions, a free plugin for Unity.

An RgCondition asset with a ‣ referenced. The Evaluator dropdown menu is drawn using MackSoft’s SerializeReference Extensions, a free plugin for Unity.