December 9, 2022
In this VR Builder tutorial, you will learn how to use the Process Editor, a graphical user interface of VR Builder, to define processes for your VR application in Unity. In detail, you will learn how to work with steps and transitions in the Process Editor.
Before getting started, you need to set up the scene for using VR Builder. Please refer to the VR Builder setup guide for additional help. For this tutorial, we will use an empty Unity scene.
After setup, the Process Editor automatically appears in a new window and displays an empty process. It contains a single chapter Chapter 1 and only the Start node. Every chapter has its own Start node. The Start node defines where the process begins for each chapter.
We recommend adding it to a wide area on the bottom, for instance, together with the Unity tabs Project and Console:
In case you closed the Process Editor and want to open it again, you can find the option to Open Process Editor from the VR Builder tab in Tools.
It is also possible to create several VR Builder processes in a single Unity project. However, every scene should only use one of them. You can select the process for a given scene by selecting the Game Object [PROCESS_CONFIGURATION] in the Hierarchy and choosing the Selected Process in the Runtime Configurator (Script) in the Unity Inspector.
A process is described by a sequence of steps. Steps are connected with each other via transitions. A step can also have several transitions entering or exiting. This allows processes to be non-linear, as illustrated by the following example from the VR Builder demo scene.
You can structure your process with chapters. There is no technical necessity to use chapters but they can help you keep the overview over the process. Before going into detail about each of these topics, please note that the Process Editor supports undo and redo for all following functions. You can either click on Edit->Undo / Edit->Redo in Unity's menu bar or use the hot keys Ctrl+Z and Ctrl+Y.
To add a new step, right-click somewhere in the empty area of the Process Editor and select Add step from the flyout.
Note that another tab - the Step Inspector - will appear directly after a step is selected. The Step Inspector is covered in the next tutorial. For now, you don't need to worry about it, so you can just move it somewhere, where it does not bother you.
To delete a step, right-click on the step and select Delete. You can also press the delete key on your keyboard.
In the same context menu, you also have the options to copy and cut the selected step. Alternatively, the hot keys Ctrl+C and Ctrl+X work as well. To paste a step, right-click in an empty area where you want to paste the step, then select Paste step.
By using the hotkey Ctrl+V, you will paste the cached step. It is even possible to paste a step into a text editor, in which case you will see the technical representation of the step. This might be a helpful gimmick for developers for debugging or hacking purposes.
To rearrange a step, left-click on it and drag it to the desired position, then release. Transitions are automatically positioned and updated while rearranging, so you don't need to worry about them.
Transitions connect steps with one another. They always exit one step and usually lead to another step. If no consecutive step is selected, this transition will lead to the end of the chapter and in case this is the last chapter, the end of the whole process. If a consecutive step is selected, it will be entered when this transition is triggered. A transition is automatically triggered as soon as all its conditions are fulfilled. In a later section, you will learn more on how to define conditions for transitions as well and how they can be fulfilled.
For now, let's dig deeper into working with transitions and their connections.
To add a transition, click on the + icon on the bottom right of the step where you want to add the transition. This transition can exit the step and be connected to a consecutive step.
To delete a transition, left-click on the trash icon next to the transition you want to delete. Since there has to be at least one transition for every step, the last transition will not disappear when deleted, but it will be emptied and the connection will be removed.
To set a transition's connection, drag'n'drop a connection with a left click from an exit node to the entry node of a step or the step itself:
To remove a transition's connection, right-click on the connection line and select Delete.
To change a transition's connection, you can simply create a new one. The existing one will be removed since only one connection per transition is possible. To model alternative paths exiting a step, use several transitions with one connection each.
It is also possible to operate on several steps and transitions at the same time. To do so, first select everything you want to work on by drag-selecting them. You can add additional and remove selected elements by pressing Ctrl and clicking on or drag-selecting them.
Then, you can use all the operations you learned in this tutorial to be applied to all of them at once.
In this VR Builder tutorial you have learned how to define a process, we can continue building more complex processes by implementing chapters.