Skip to content

Universal Wizard -> Call Method

Universal Wizard -> Call Method

Postby Neodrop » 27 Mar 2011, 19:56

Wizards are a heavy cavalry of Universe. You can create a code of any complexity with this group of blocks, practically not using any other blocks. Perhaps the only blocks that can't be replaced by Wizards are Activators and FSM blocks.
Wizards are divided into two categories: MonoBehaviour Wizards and Universal Wizards

Universal Wizards are really universal. But we don't recommend beginner programmers to use them.
Universal Wizards were created to help programmers quickly solve any given task without writing a new Smart Block.
With the help of Universal Wizards you can call any public method in any class available to your application.
These can be Unity classes, MonoBehaviours or any other public .NET classes.

Let's suppose you want to get a list of folders in your project. We are going to use System.IO namespace for that.

Add Universal Wizard block to the Graph.
Open Inspector and enter the wanted type into search textfield:

SelectClass.jpg
SelectClass.jpg (93.1 KiB) Viewed 17709 times


Then select the needed method from "Select Method to call" dropdown list.

NOTE : Depending on the selected class, the list can be very long. In order to find the needed method more quickly, press a key on the keyboard with the first letter in the name of the needed method. E.g. for GetCurrentDirectory this is 'G'. Then the list is going to focus on methods which names start from this letter.

The following code will output the list of directories in your Project :

GetDirectoriesList.jpg
GetDirectoriesList.jpg (115.87 KiB) Viewed 17709 times
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Return to Behaviour

Who is online

Registered users: No registered users