March 23, 2023
In this VR Builder tutorial, you will learn about how to implement chapters and non-linear chapter logic with the help of End Chapter nodes.
Chapters can be used to structure complex processes. As every chapter has its own, separate graph, splitting up your process into several chapters makes it possible to keep clarity when creating complex processes. In the next subsection we will share best practices on working with chapters.
We recommend creating one chapter for each self-contained topic, as well as the introduction and the outro. An example for using chapters to structure the workflow can be found in the demo scene provided with VR Builder.
In this example, there are five main tasks: Magic cube, slice the magic cube, assemble stairs, disable shield and throw ball. Each one of them stating the actions to be performed in every station of the application. By defining the chapters first, then the process, and finally the steps, we were able to better define the process of the application.
It is best to create the chapter structure early on since splitting a chapter in two involves a lot of manual work.
Next to the chapter, you find four icons. The first two are the up and down arrows. By clicking on them, you can move this chapter up and down one slot.
Note that chapters follow by default a linear order. So, at the end of the first chapter, the second one automatically starts. At the end of the second chapter, the third one starts, and so on.
Next to the arrow icons, you have a trash bin icon for deleting the chapter and an edit icon which allows you to rename it. You can add new chapters by clicking on the + Add Chapter button on the bottom of the chapter list.
Sometimes, some flexibility is needed while creating long processes, and having the ability to manage non-linearity between different chapters provides this flexibility on the structure. Let’s learn how to manage them.
In VR Builder version 2.6.0 we’ve added End Chapter nodes. These nodes allow you to select which is the next chapter to follow in the Process.
Inside the process editor, you can create them by right clicking and accessing New> End Chapter. In this node you will be able to select which is the chapter to follow in the process.
The <Next Chapter> option in the dropdown, is the default option. With this selection the process will continue to the consecutive chapter in the chapter order when this node is reached. This means that reordering the chapters' order, the <Next Chapter> will automatically be updated, but this is also equivalent to having no End Chapter node.
If another chapter is explicitly selected, then the process will jump to that chapter instead of defaulting to the following one.
If you need to end the application prematurely, either this be a design decision or to help you debug your application. You can terminate the chapter prematurely by creating an empty chapter and an end node directed to the newly created chapter where you want your application to end.
In this VR Builder tutorial you have learned about chapters and how to use the end chapter node to have a more flexible process structure. Now, let’s learn how to define steps in the Step Inspector.
If you have any further questions, please join the VR Builder community on discord and get in touch with VR Builder users and developers.