The SDK of this version is still being tested, and these pages are being updated with it: names, menus and procedures may still change before the release. If you build content for a platform already in production, follow the documentation of that version — pick it from the version menu at the top right.
Task System Graph and Nodes
The TaskSystem GameObject contains a script component called “GraphBehaviour”. On the component's inspector there's a button called “Open Graph”. By clicking on it you can access the graph window where you can create all your tasks with their associated detectors.

In the Graph window you can create tasks by pressing the right click on your mouse, then hit "Create Node" and choose the task you want to create from the list of proposed nodes.
When a new Task Node is added to the graph, a game object of the same node appears in the hierarchy. The game object has a Task listener child, and, for the nodes that detect an action, a Detector child. These are the manual way to complete a task and to react to it:
- Task listener: Manage the triggering of actions and events by referencing task system events.
- Detector: Manage the triggering of actions and events by referencing specific actions. The actions depend on the type of node selected
The nodes in the graph window have the "Next" and "Dependencies" fields. These are used to handle the logic and flow of the taskSystem.

By completing all the dependencies is how the task progresses to the node attached to the "Next" slot.
The node also holds the texts of the task: the Description that the task panel shows and, for a procedure, a Hint, a Right Feedback and a Wrong Feedback. See Task Step.
Completing a task without listeners
You do not have to wire a listener and a detector for each task. The task elements (Target, Choice, Distractor, Question, Reach Zone, Watch, Item On Target, Collect) detect the action and report its result on the task: drop the element prefab in the scene and set its Task to the task's GameObject. For logic of your own, a Task Step, the Tasks API and the Visual Scripting task nodes complete, fail or unlock a task from a script or a graph. To score the tasks, add a procedure.
Building the graph from an editor script
The graph window is not the only way to build the graph: an editor script can create the nodes and the links, which helps when a scene has many tasks, or when you generate scenes from code. Put the script in an Editor folder.
using System.Linq;
using SPACS.Graphs;
using SPACS.Tasks;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
public static class BuildTaskGraph
{
[MenuItem("Tools/Build task graph")]
private static void Build()
{
GraphBehaviour graphBehaviour = Object.FindFirstObjectByType<GraphBehaviour>();
IGraph graph = graphBehaviour.Value;
string[] descriptions = { "Open the door", "Press the button", "Leave the room" };
TaskNode previous = null;
for (int i = 0; i < descriptions.Length; i++)
{
TaskNode node = (TaskNode)Node.GenerateNode(typeof(TaskNode));
node.Name = "Task " + (i + 1);
node.Description = descriptions[i];
node.ShowInUI = true;
node.Position = new Vector2(300f * i, 0f);
graph.AddNode(node);
if (previous != null)
{
Link(graph, previous, "next", node, "input");
}
previous = node;
}
EditorUtility.SetDirty(graphBehaviour);
EditorSceneManager.MarkSceneDirty(graphBehaviour.gameObject.scene);
}
// The graph keeps each link on both ports: add it in both directions.
private static void Link(IGraph graph, Node from, string outputPort, Node to, string inputPort)
{
Port output = from.Ports.First(p => p.Name == outputPort);
Port input = to.Ports.First(p => p.Name == inputPort);
graph.AddLinkBetween(output, input);
graph.AddLinkBetween(input, output);
}
}
GraphBehaviour.Valueis the graph of the TaskSystem GameObject.Node.GenerateNodecreates a node, andAddNodeadds it to the graph and creates its GameObject, with its Task listener, under the TaskSystem.- The ports of a task are named
input,nextanddependencies. Linknextof a task toinputof the following one for a chain; to make a task depend on others, link itsdependenciesto theirinput. - Add the nodes in the order of the chain: the task system treats the last node added as the last task, and ends the training when it is completed. With a procedure the run ends when every scored task is completed or failed instead.
- The node has no title: the task panel shows its Description.
AddNodepicks the first component class it finds that can hold a task and logs a warning when it finds several: check that each new GameObject carries a Task Virtuademy component.
Task System Multiplayer setup
In order to make the taskSystem work in multiplayer you simply have to tick the "Is Networked" field in the TaskSystemVirtuademy and add the "TasksRPCManagerPlaceholder" to the TaskSystem gameObject. Check the Example Scene in the package to check how to better manage a multiplayer task flow.
With a procedure on the task system, this switch makes it a shared procedure: the results, hints and score are the same for every user of the room, and the analytics form one team run. See Shared procedures.
