Using the editor - Zelgunn/Unity3DTools GitHub Wiki
Using the editor
Table of Contents
Opening the editor
Now that you are familiar with the core concepts of the Editor, let's open it:
Click the new button under "Window" on the toolbar, called "Triggers editor".
The editor is divided in four areas:
1. Triggers
The left panel contains the list of all your triggers in the open scene. Two buttons are available per Trigger:
- Select : Selects a trigger, showing it in the panel Routines
- Delete : Removes the trigger from the scene
You can also create new triggers by filling the text field and pressing "Create trigger". Note that the name of a trigger is unique, and cannot be blank.
2. Routines
The top panel contains the list of all the routines in the selected trigger.
The name of the selected trigger also appears at the top of this panel, and can be changed. The check box "Enabled at start" allows you to disable or enable a trigger at start. A disabled trigger does not check events, but can be run from another trigger. A trigger can also be enabled or disabled at run time.
Routines are sorted depending on their type (Event/Condition/Action). Then they are sorted in the "processing order", (first routines are processed first), this is mostly relevant for actions.
Five buttons are available per routine:
- Select : Selects a routine, showing it in the Node editor
- Duplicate : The routine is fully duplicated and appended at the end of the list
- Move down : Move the routine down in the "processing order"
- Move up : Move the routine up in the "processing order"
- Delete : Removes the routine from the trigger
Note : The selected routine is highlighted in green.
You can also rename the routine currently selected with the following text field (at the bottom of this panel):
Note : Routines are created from the fourth panel : "Node browser"
3. Node editor
When a routine is selected, you can parameter it with the Node editor, displayed at the bottom of the editor.
To add new nodes, you must use the Node browser (fourth panel).
You can connect node between by clicking one of the connectors and then dragging your mouse to the other connector. You can only connect an input connector (on the left of the node) to an output connector (on the right of the node) and only to a different node.
When an input is not connected, you can set its value manually. Some of the inputs use objects from the scene, you can drag item directly from the scene or from the hierarchy, or you can click on the little circle to browse the available objects.
One (and only one) of the node won't have any output and have a green outline, this is the final node.
You can delete a node by right-clicking on it and choosing "Delete node > Validate":
You can't delete a final node. If a node is eligible for becoming a final node, a second option (as shown in the previous image) will appear to do so.
4. Node browser
The node browser allows you to add nodes to a routine and to create a new routine based on a given node. Nodes are sorted in categories. Just like routines, nodes also have a type (Event/Condition/Action/Other), you can choose to filter which type you want to displayed with the drop-down menu at the top:
As you can see, node have up to two buttons:
- Add : Creates a new routine, containing this node (this node is set as the Final node)
- Insert : Insert the node to the selected routine
Note : The "Add" button is not available if the type of the node is "Other" (it can't be a final node).
Note : The "Insert" button is not available if no routine is selected.