v3.6.1 Documentation
Fungus.InvokeMethod Class Reference

Invokes a method of a component via reflection. More...

Inheritance diagram for Fungus.InvokeMethod:
Fungus.Command

Public Member Functions

override void OnEnter ()
 Called when this command starts execution. More...
 
override Color GetButtonColor ()
 Return the color for the command background in inspector. More...
 
override string GetSummary ()
 Returns the summary text to display in the command inspector. More...
 
- Public Member Functions inherited from Fungus.Command
virtual Flowchart GetFlowchart ()
 Returns the Flowchart that this command belongs to. More...
 
virtual void Execute ()
 Execute the command. More...
 
virtual void Continue ()
 End execution of this command and continue execution at the next command. More...
 
virtual void Continue (int nextCommandIndex)
 End execution of this command and continue execution at a specific command index. More...
 
virtual void StopParentBlock ()
 Stops the parent Block executing. More...
 
virtual void OnStopExecuting ()
 Called when the parent block has been requested to stop executing, and this command is the currently executing command. More...
 
virtual void OnCommandAdded (Block parentBlock)
 Called when the new command is added to a block in the editor. More...
 
virtual void OnCommandRemoved (Block parentBlock)
 Called when the command is deleted from a block in the editor. More...
 
virtual void OnExit ()
 Called when this command ends execution. More...
 
virtual void OnReset ()
 Called when this command is reset. More...
 
virtual void GetConnectedBlocks (ref List< Block > connectedBlocks)
 Populates a list with the Blocks that this command references. More...
 
virtual bool HasReference (Variable variable)
 Returns true if this command references the variable. More...
 
virtual string GetHelpText ()
 Returns the help text to display for this command. More...
 
virtual bool OpenBlock ()
 Return true if this command opens a block of commands. More...
 
virtual bool CloseBlock ()
 Return true if this command closes a block of commands. More...
 
virtual bool IsPropertyVisible (string propertyName)
 Returns true if the specified property should be displayed in the inspector. More...
 
virtual bool IsReorderableArray (string propertyName)
 Returns true if the specified property should be displayed as a reorderable list in the inspector. More...
 
virtual string GetFlowchartLocalizationId ()
 Returns the localization id for the Flowchart that contains this command. More...
 

Protected Member Functions

virtual void Awake ()
 
virtual IEnumerator ExecuteCoroutine ()
 
virtual System.Type [] GetParameterTypes ()
 
virtual object [] GetParameterValues ()
 
virtual void SetVariable (string key, object value, string returnType)
 

Protected Attributes

string description = ""
 
GameObject targetObject
 
string targetComponentAssemblyName
 
string targetComponentFullname
 
string targetComponentText
 
string targetMethod
 
string targetMethodText
 
InvokeMethodParameter [] methodParameters
 
bool saveReturnValue
 
string returnValueVariableKey
 
string returnValueType
 
bool showInherited
 
CallMode callMode
 
Type componentType
 
Component objComponent
 
Type [] parameterTypes = null
 
MethodInfo objMethod
 
- Protected Attributes inherited from Fungus.Command
int itemId = -1
 
int indentLevel
 
string errorMessage = ""
 

Properties

virtual GameObject TargetObject [get]
 GameObject containing the component method to be invoked. More...
 
- Properties inherited from Fungus.Command
virtual int ItemId [get, set]
 Unique identifier for this command. More...
 
virtual string ErrorMessage [get]
 Error message to display in the command inspector. More...
 
virtual int IndentLevel [get, set]
 Indent depth of the current commands. More...
 
virtual int CommandIndex [get, set]
 Index of the command in the parent block's command list. More...
 
virtual bool IsExecuting [get, set]
 Set to true by the parent block while the command is executing. More...
 
virtual float ExecutingIconTimer [get, set]
 Timer used to control appearance of executing icon in inspector. More...
 
virtual Block ParentBlock [get, set]
 Reference to the Block object that this command belongs to. More...
 

Detailed Description

Invokes a method of a component via reflection.

Supports passing multiple parameters and storing returned values in a Fungus variable.

Definition at line 20 of file InvokeMethod.cs.

Member Function Documentation

◆ Awake()

virtual void Fungus.InvokeMethod.Awake ( )
protectedvirtual

Definition at line 77 of file InvokeMethod.cs.

◆ ExecuteCoroutine()

virtual IEnumerator Fungus.InvokeMethod.ExecuteCoroutine ( )
protectedvirtual

Definition at line 100 of file InvokeMethod.cs.

◆ GetButtonColor()

override Color Fungus.InvokeMethod.GetButtonColor ( )
virtual

Return the color for the command background in inspector.

Returns
The button color.

Reimplemented from Fungus.Command.

Definition at line 306 of file InvokeMethod.cs.

◆ GetParameterTypes()

virtual System.Type [] Fungus.InvokeMethod.GetParameterTypes ( )
protectedvirtual

Definition at line 110 of file InvokeMethod.cs.

◆ GetParameterValues()

virtual object [] Fungus.InvokeMethod.GetParameterValues ( )
protectedvirtual

Definition at line 125 of file InvokeMethod.cs.

◆ GetSummary()

override string Fungus.InvokeMethod.GetSummary ( )
virtual

Returns the summary text to display in the command inspector.

Reimplemented from Fungus.Command.

Definition at line 311 of file InvokeMethod.cs.

◆ OnEnter()

override void Fungus.InvokeMethod.OnEnter ( )
virtual

Called when this command starts execution.

Reimplemented from Fungus.Command.

Definition at line 265 of file InvokeMethod.cs.

◆ SetVariable()

virtual void Fungus.InvokeMethod.SetVariable ( string  key,
object  value,
string  returnType 
)
protectedvirtual

Definition at line 213 of file InvokeMethod.cs.

Member Data Documentation

◆ callMode

CallMode Fungus.InvokeMethod.callMode
protected

Definition at line 70 of file InvokeMethod.cs.

◆ componentType

Type Fungus.InvokeMethod.componentType
protected

Definition at line 72 of file InvokeMethod.cs.

◆ description

string Fungus.InvokeMethod.description = ""
protected

Definition at line 23 of file InvokeMethod.cs.

◆ methodParameters

InvokeMethodParameter [] Fungus.InvokeMethod.methodParameters
protected

Definition at line 50 of file InvokeMethod.cs.

◆ objComponent

Component Fungus.InvokeMethod.objComponent
protected

Definition at line 73 of file InvokeMethod.cs.

◆ objMethod

MethodInfo Fungus.InvokeMethod.objMethod
protected

Definition at line 75 of file InvokeMethod.cs.

◆ parameterTypes

Type [] Fungus.InvokeMethod.parameterTypes = null
protected

Definition at line 74 of file InvokeMethod.cs.

◆ returnValueType

string Fungus.InvokeMethod.returnValueType
protected

Definition at line 62 of file InvokeMethod.cs.

◆ returnValueVariableKey

string Fungus.InvokeMethod.returnValueVariableKey
protected

Definition at line 58 of file InvokeMethod.cs.

◆ saveReturnValue

bool Fungus.InvokeMethod.saveReturnValue
protected

Definition at line 54 of file InvokeMethod.cs.

◆ showInherited

bool Fungus.InvokeMethod.showInherited
protected

Definition at line 66 of file InvokeMethod.cs.

◆ targetComponentAssemblyName

string Fungus.InvokeMethod.targetComponentAssemblyName
protected

Definition at line 30 of file InvokeMethod.cs.

◆ targetComponentFullname

string Fungus.InvokeMethod.targetComponentFullname
protected

Definition at line 34 of file InvokeMethod.cs.

◆ targetComponentText

string Fungus.InvokeMethod.targetComponentText
protected

Definition at line 38 of file InvokeMethod.cs.

◆ targetMethod

string Fungus.InvokeMethod.targetMethod
protected

Definition at line 42 of file InvokeMethod.cs.

◆ targetMethodText

string Fungus.InvokeMethod.targetMethodText
protected

Definition at line 46 of file InvokeMethod.cs.

◆ targetObject

GameObject Fungus.InvokeMethod.targetObject
protected

Definition at line 26 of file InvokeMethod.cs.

Property Documentation

◆ TargetObject

virtual GameObject Fungus.InvokeMethod.TargetObject
get

GameObject containing the component method to be invoked.

Definition at line 263 of file InvokeMethod.cs.


The documentation for this class was generated from the following file: