Skip to main content
Version: 2026.6

Task System Prefab

In order to use the task system you need to add the TasksLogic prefab to the scene. You can find the prefab in Virtuademy-SDK-Environments > Runtime > Tasks > Prefabs.

The TasksLogic prefab in Packages > Virtuademy-SDK-Environments > Runtime > Tasks > Prefabs

Inside the prefab you’ll find 2 GameObjects:

ComponentList

  • MainUIWorldSpaceCanvas: Contains the taskUIPanel used to display the titles and descriptions of the tasks that the user has to perform.
Note

You can turn off the Canvas component of the GameObject if you don't want to show the panel inside the environment.

Warning

Don't turn off the MainUIWorldSpaceCanvas GameObject or the task system logic won't work!

  • TaskSystem: Contains the actual logic and timeline of the tasks. This is where you create and manage tasks and their dependencies.

The steps counter​

The task panel shows the current step and the total, for example 01 / 03. What is counted is set in the Task UI Manager component of the TaskUIPanel (under MainUIWorldSpaceCanvas), in the Steps Tasks Type field:

  • Macrotask (the default) counts only the tasks that have Dependencies, that is the tasks made of subtasks.
  • Subtask counts the tasks that have none, and the tasks at the deepest level shown.
A flat chain shows "00" as the total

A graph whose tasks are linked only through Next, with no Dependencies, has no macrotask: with the default setting the total reads 00. Set Steps Tasks Type to Subtask to count every task of the chain. The current step is the number of completed tasks plus one.

Sample scene

You can find a sample scene, Sample Task Scene, in the samples section of the Virtuademy-SDK-Environments package, inside the package manager.

Package Manager: the Samples tab of Virtuademy-SDK-Environments, with Import next to Sample Task Scene

Note

After the download, the scene can be found in the following path:
Assets > Samples > Virtuademy-SDK-Environments > 10.0.0 > Sample Task Scene (the number is the version of the package)

Known issues​

  • A task that fails does not advance the chain. The chain moves on only when a task is Completed: that is what unlocks the next task and completes the tasks that depend on it. A task set to Failed (the FailTask method of the task) unlocks nothing, so the chain stops there and the training never reaches its end panel. Do not fail a task unless the training is meant to end there.
  • The panel can count one step more than the graph has. It was seen with a graph that starts with an introduction text: 18 tasks, and the panel read "n/19". The cause is not known. Check the total on the panel against your graph, and see The steps counter for the setting that decides what is counted.
  • Files that appear in the project. Using TasksLogic leaves an untracked Assets/TextMesh Pro/ folder, which is the TextMesh Pro essential resources its texts use (see SDK setup). The Task UI Placeholder creates an empty Assets/SpawnableObject/SpawnableObjectList.asset every time the scene opens, and the cause is not known. It is not established whether a project should commit them. The TextMesh Pro folder can be imported again from the menu, and the list is created again each time the scene opens: decide it for your team, and keep it the same on every machine.