Skip to content

Visual Graph Editing

Visual Graph Editing

Postby Neodrop » 01 Apr 2011, 13:43

Visual code creation starts from placing blocks which perform certain operations in Work Area. Let’s have a look at an example where we are going to print “Hello world!” phrase onto the screen:

:!: 1. We need to create a Graph first. To do it press CREATE in Antares/Universe menu and accept the creation of the Graph in a popup window.

:!: 2. If you see the following message in the opened Universe window :

attention.png (14.7 KiB) Viewed 2186 times

we seriously recommend saving your scene before proceeding further.

:!: 3. Graph chains execution starts from special blocks called Activators. Each Activator has its own purpose. In order to print a piece of text to the screen we need to use On GUI Activator. You can find it by unfolding activators category in the panel to the right or by typing “On GUI” into the search textfield (and successfully reducing the amount of selectable blocks so you can find the needed block much quicker):

toolbox.png (18.39 KiB) Viewed 2186 times

searchField.png (12.23 KiB) Viewed 2186 times

:!: 4. Press activator creation button and place it into Work Area:

WorkArea.png (35.25 KiB) Viewed 2186 times

:!: 5. Now it’s necessary to create a block which will output some text to the screen – Label block. Type in the word “Label” into the search textfield and choose a block from GUILayout group which accepts text as an input parameter:

tooltips.png (22.55 KiB) Viewed 2186 times

and place it into Work Area:

WorkArea2.png (41.73 KiB) Viewed 2186 times

:!: 6. In order for this block to display our phrase you need to specify this phrase as a parameter. This can be done in several ways:
a. In Inspector window:

InspectorWindow.png (28.38 KiB) Viewed 2186 times

b. By pressing mouse wheel or pressing Enter when mouse is over the block’s text parameter:

pressMouseWheel.png (17.81 KiB) Viewed 2186 times

:!: 7. Now when we have two blocks performing the necessary actions we need to connect them into a logic chain. To do this click on the output pin (triangle) of the activator and drag it to input pin of the Label block:

triggersOut.png (18.51 KiB) Viewed 2186 times

A new connection will be created:

connected.png (17.92 KiB) Viewed 2186 times

:!: 8. Now everything is ready to start our Visual Graph. Press Save button and hit Play without closing Universe Editor window.

pressPlay.png (35.47 KiB) Viewed 2186 times

:!: 9. As it is seen from the figure above, currently executing blocks are outlined red and connections – light-blue.

:!: 10. You can edit the Graph right in Play Mode, but if you want to save your changes – press Save button and stop the application without closing Universe Editor window.
Visual Graph Editing.pdf
(251.96 KiB) Downloaded 239 times
User avatar
Posts: 1068
Joined: 15 Jan 2011, 13:18

Return to Documentation

Who is online

Registered users: No registered users