Version: 
PiXYZ Plugin for Unity
Scripting API Documentation
ActionInOut< Input, Output >abstract
Inheritance diagram for ActionInOut< Input, Output >:
ActionBase

Public Member Functions

abstract Output run (Input input)
 
virtual string [] getErrors ()
 
virtual string [] getWarnings ()
 
virtual string [] getInfos ()
 
virtual void onBeforeDraw ()
 
void initialize ()
 
object invoke (object data)
 

Public Attributes

override Type inputType => typeof(Input)
 
override Type outputType => typeof(Output)
 
bool isInRuleEngine => !string.IsNullOrEmpty(menuPathRuleEngine)
 
bool isInToolbox => !string.IsNullOrEmpty(menuPathToolbox) && inputType == typeof(IList<GameObject>) && outputType == typeof(IList<GameObject>)
 

Properties

abstract int id [get]
 
virtual string menuPathRuleEngine [get]
 
virtual string menuPathToolbox [get]
 
virtual string tooltip [get]
 
FieldInstance [] fieldInstances [get]
 
MethodInfo [] helpersMethods [get]
 
string displayNameRuleEngine [get]
 
string displayNameToolbox [get]
 

Detailed Description

Inherit from this class to create an Action that returns some data from a given input. Can be used to create a Toolbox Actions and/or RuleEngine Actions. Check PiXYZ.Plugin.Unity.Tools.ActionBase for more implementation details.

Warning
If creating a Toolbox Action, the Input & Output must be of type IList<GameObject>
Template Parameters
InputSpecifies what kind of data enters your actions. (Eg: IList<GameObject>, IList<Material>, Mesh, string[], ...)
OutputSpecifies what kind of data the actions outputs. (Eg: IList<GameObject>, IList<Material>, Mesh, string[], ...)

Member Function Documentation

◆ getErrors()

virtual string [] getErrors ( )
virtualinherited

Virtual method for Error checks before execution.

Returning a non null string array will display each string as an Error on the RuleEngine and Toolbox.

Returns

◆ getInfos()

virtual string [] getInfos ( )
virtualinherited

Virtual method for Info checks before execution.

Returning a non null string array will display each string as an Information on the RuleEngine and Toolbox.

Returns

◆ getWarnings()

virtual string [] getWarnings ( )
virtualinherited

Virtual method for Warning checks before execution.

Returning a non null string array will display each string as a Warning on the RuleEngine and Toolbox.

Returns

◆ initialize()

void initialize ( )
inherited

Initialize parameters from RuleEngineParameters attributes.

◆ invoke()

object invoke ( object  data)
inherited

Runs the action through reflection

Parameters
data
Returns

Takes the generic type Builds an instance an run !

◆ onBeforeDraw()

virtual void onBeforeDraw ( )
virtualinherited

Virtual method for implementing operations before the Action gets drawn in the RuleEngine or the Toolbox.

◆ run()

abstract Output run ( Input  input)
pure virtual

Abstract execution method.

When creating a new action, this method implementation will hold all the processing code.

Parameters
inputInput data, of the given inputType
Returns
Output data, of the given outputType

Member Data Documentation

◆ inputType

override Type inputType => typeof(Input)

Input type.

Specifies what kind of data enters your actions. (Eg: IList<GameObject>, IList<Material>, Mesh, string[], ...)

◆ isInRuleEngine

bool isInRuleEngine => !string.IsNullOrEmpty(menuPathRuleEngine)
inherited

Returns true if this Action is available trough the RuleEngine.

◆ isInToolbox

bool isInToolbox => !string.IsNullOrEmpty(menuPathToolbox) && inputType == typeof(IList<GameObject>) && outputType == typeof(IList<GameObject>)
inherited

Returns true if this Action is available trough the Toolbox.

◆ outputType

override Type outputType => typeof(Output)

Output type.

Specifies what kind of data the actions outputs. (Eg: IList<GameObject>, IList<Material>, Mesh, string[], ...)

Property Documentation

◆ displayNameRuleEngine

string displayNameRuleEngine
getinherited

Returns the display name (without menu path).

◆ displayNameToolbox

string displayNameToolbox
getinherited

Returns the display name (without menu path)

◆ fieldInstances

FieldInstance [] fieldInstances
getinherited

Eventual fields.

Fields can be added for an Action implementation thanks to the attribute PiXYZ.Plugin.Unity.Tools.UserParameter.

◆ helpersMethods

MethodInfo [] helpersMethods
getinherited

Eventual helper methods.

Helper methods can be added for an Action implementation thanks to the attribute PiXYZ.Plugin.Unity.Tools.HelperMethod.

◆ id

abstract int id
getinherited

The id of the Acton implementation.

This id should be unique and is readonly (written in code). The id is the actual reference if the Action is serialized (in a set of RuleEngine Rules for example), hence, this shouldn't be changed if possible when someone uses it.

◆ menuPathRuleEngine

virtual string menuPathRuleEngine
getinherited

The menu path for the RuleEngine.

Use forward slashes for submenus (ex:"Custom/My Custom Action") If left null or empty, this Action won't be listed in the RuleEngine.

◆ menuPathToolbox

virtual string menuPathToolbox
getinherited

The menu path for the Toolbox.

Use forward slashes for submenus (ex:"Custom/My Custom Action") If left null or empty, this Action won't be listed in the Toolbox.

◆ tooltip

virtual string tooltip
getinherited

Returns the tooltip.