Case Status
Log In

Wiki

Options

 
Home ยป Action Reference»ScriptControl Actions»Call Method
Index
Navigation
Community Wiki

Call Method

Lets you call a method in a script on a Game Object.

Unlike Invoke Method, or Send Message, you can use multiple parameters and get a return value.

Behaviour
The behaviour on a GameObject that has the method you want to call. Drag the script component from the Unity inspector into this slot. HINT: Use Lock if the script is on another GameObject.

NOTE: Unity Object fields show the GameObject name, so for clarity we show the Behaviour name as well below.
Method
Select from a list of available methods.

NOTE: The full method signature is visible below.
Parameters
Method parameters.

NOTE: This UI is built automatically when you select the method.
Store Result
If the Method has a return, use this to store it in a variable.
Every Frame
Repeat every frame.
Manual UI
Revert to the old Manual UI where all parameters had to be configured manually.

 

Example Usage:

Note how we drag the component itself into the Behaviour slot.

Known Issues

After you drag a component into the Behaviour slot, the slot is now of that type, and will only accept behaviors of that type. To change the type select None first or Reset the action in the Action Settings Menu. We're investigating a smoother solution...

Tags:

Last modified on 10/25/2017 1:47 PM by User.

  • RSS Feed