Skip to main content
Version: 2026.7
Still in testing

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 Elements

A task element is a ready-made way to detect one kind of action and report its result on a task. It replaces the task listeners and detectors you wired by hand: you drop the prefab in the scene, put your model inside, set its Task, and the element does the rest.

ElementPlaceholderPrefabThe user...
TargetTargetElementPlaceholderProcTargetinteracts with (or selects) the object
ChoiceChoiceElementPlaceholderProcChoicepicks the object and confirms
DistractorDistractorElementPlaceholderProcDistractoruses an object that should not be used
QuestionQuestionElementPlaceholderProcQuestion, ProcQuestionPoolanswers a quiz, or quizzes drawn from a pool
Reach ZoneReachZoneElementPlaceholderProcReachZonewalks into a zone
WatchWatchElementPlaceholderProcWatchwatches a video, closes a POI, or closes a panel
Item On TargetItemOnTargetElementPlaceholdernoneputs the right item, or uses the right tool, on the object
CollectCollectElementPlaceholderProcCollectpicks the object up into the inventory

The prefabs are in Virtuademy-SDK-Environments > Runtime > Tasks > Prefabs > Elements. Each carries the element, an Interactable, a Visual Scripting Interactable, an Interaction Cue with its feedback objects, and a placeholder model named Model (replace): delete it and put your own 3D model inside. The model's colliders are your own; the placeholder cube has a solid collider.

Note

The elements only detect and report. How much an action is worth, what a wrong one costs and when the run ends belong to the procedure. Without a procedure, a right result completes the task, as the Complete Task node does, and a wrong one is only an event.

What every element has​

SettingDefaultWhat it does
TasknoneThe GameObject of the task the element reports on. Empty: the element has no task, it only raises its events and shows its cue's right or wrong look
Report Only When Task ActiveonThe element reports only while its task is to do or in progress. Otherwise the action is ignored, unless the procedure counts out-of-order actions as errors. Off: it always reports
Completed ByAny PlayerWhose action completes the element in a multiplayer room: Any Player or Local Player Only. It changes Item On Target only; see Shared procedures

Events: On Right, On Wrong and On Reported (UnityEvents), and Reported for scripts (TaskResultHandler), raised for every result the element reports, or would report without a task. The method Report(TaskResult result) reports a result as the element does, for custom logic on top of it. See Results.

A result is right or partial when the task is completed, wrong when it is an attempt that leaves the task to do. A wrong action shows on the cue of the object that caused it (the decoy, the wrong choice), not on the task's other objects.

Elements need an Interactable (Target, Choice, Distractor), and the Interactable events they use need a Visual Scripting Interactable Placeholder on the same object: the prefabs have both. Target, Choice and Distractor act on one click: they switch the Selected state of the Visual Scripting Interactable off, so the first click counts. A Target that completes On Select keeps it.

Target​

The user interacts with the object (or selects it) and the task is completed, right.

SettingDefaultWhat it does
On SelectoffCompletes on select instead of on interact

Use it for "press the button", "touch the panel", "find the object".

Choice​

The user picks the object, a confirmation opens, and confirming reports the choice.

SettingDefaultWhat it does
Is CorrectonWhether this is a right choice. A right choice completes the task; a wrong one is a wrong attempt
One ShotoffA wrong choice completes the task with 0 points instead of being an attempt: the user has one try
Confirm Panelfrom the prefabThe confirmation: a Virtuademy Panel, whose primary button confirms and whose secondary button cancels. Empty: the pick is confirmed at once
Wrong ReasonemptyWhy a wrong choice is wrong. It is listed in the summary, and shown as the wrong feedback when the task has no wrong feedback text of its own

Put several ProcChoice in a scene with the same task and set Is Correct on the right one.

Distractor​

An object that should not be used. Using it is a wrong attempt with a reason, and it never completes anything.

SettingDefaultWhat it does
Penalty Points5Without a task: the points taken off the procedure's total
Counts As ErroronWithout a task: whether it counts as an error (towards Max Errors)
ReasonemptyWhy it is wrong. It is listed in the summary, and shown as the wrong feedback when the task has no wrong feedback text of its own
ProcedureemptyWithout a task: the procedure to charge. Empty: the procedure of the task system the object is under
  • With a task, using the distractor is a wrong attempt on that task, as a wrong tool is: the task loses the procedure's Error Penalty and the procedure counts an error. Penalty Points and Counts As Error are not used.
  • Without a task it takes Penalty Points off the total, and counts as an error when Counts As Error is on.

Question​

A quiz answered to the end completes the task with the quiz's score.

SettingDefaultWhat it does
Quizthe quiz on this objectThe quiz to ask. Ignored when the pool has quizzes
PoolemptyThe quizzes to draw from. Empty: the single quiz
Draw Count0How many quizzes of the pool are drawn. 0: all of them
ShuffleonDraws at random. Off: in the pool's order
Wrong Below0A score from 0 to 1. Below it, the question counts as answered wrong

The prefab ProcQuestion is the element with a quiz inside; ProcQuestionPool has two quizzes in its pool. The quiz is a Quiz Panel: the element waits for its Confirm.

  • The result is the quiz's score, normalised: (score - the lowest possible) / (the highest possible - the lowest possible). A whole quiz right is Right, nothing right is Wrong, in between is Partial, which a procedure treats as a positive result with fewer points. With a pool, the result is the mean of the quizzes drawn.
  • Wrong Below turns a partial result into a wrong one. At the default (0) a question is wrong only when nothing scores. At 1, anything short of the whole quiz is wrong. Below the value: the wrong feedback, the error sound, a Mistake row in the summary, one error (the summary's Errors, which Max Errors counts), and the step scores 0. The task is still completed, so the flow goes on.
  • Each answer scores when it is set right, picked or not, so a quiz that is partly right scores between 0 and 1 and gives the positive feedback unless Wrong Below is above its score.
  • After each quiz the user sees the quiz's own recap, with a Continue button on every quiz but the last; the last recap ends the question.
  • The quizzes of the pool that are not drawn, and those not shown yet, are kept inactive. In a shared procedure the master draws, and every user sees the same quizzes.

Reach Zone​

The user walks into a zone and the task is completed, right. Put the element on an object with a trigger collider (the prefab has a box). The element warns if there is none.

Only the local player's collider is detected: a collider under the player's root, or the moving body that carries it, which is how the desktop and mobile character is built. A teammate walking into the zone completes it for the room from their own client.

Watch​

The user watches or reads something to the end and the task is completed, right.

SettingDefaultWhat it does
Watchedthis objectThe object to watch: with a Video Player (the video reaching its end), a POI Placeholder (the POI closed) or a Virtuademy Panel (the panel hidden). Empty: this object

Item On Target​

The right item placed on the object, or the right tool used on it, completes the task, right. A wrong item is a wrong attempt. Put the element beside an Inventory Item Trigger Detector Placeholder, which says which item and how it is activated; see Item targets and Inventory and items.

SettingDefaultWhat it does
Detectorthe one on this objectThe detector
Wrong ReasonemptyWhy a wrong item is wrong. It is listed in the summary, and shown as the wrong feedback when the task has no wrong feedback text of its own
  • The detector's Activation says how a tool works on the target: Contact (bringing the right tool to it is enough) or Use (the tool must touch it while it is used).
  • The element's cue and the procedure show the feedback: the detector's own check and cross do not show as well.
  • A target refuses items once its task is done. While the task is completed, failed or locked, the target takes no item: the item keeps its use and stays in the inventory, and neither the right nor the wrong events and feedback fire. A key used again on a door that is already open does not spend a use. A target with no task takes every item.
  • Completed By applies here: the detector sees every player's items and tools on every client. Any Player (the default): a teammate's item counts, and in a shared procedure the master reports it once for the room. Local Player Only: a teammate's item is ignored (no completion, no wrong attempt), and the client of the player who acted reports it.

Collect​

The user picks the object up into the inventory and the task is completed, right. Put the element beside a Pickable Placeholder; ProcCollect has one. Add a Wearable Placeholder to have the item worn in its Wear Slot (a helmet in the Head slot). The scene needs an Inventory Placeholder: see Inventory and items.

SettingDefaultWhat it does
Pickablethe one on this objectThe pickable to collect

The user who picks the item up reports it, once.

Shared procedures​

In a shared procedure every user's action is reported from that user's own client and synced to the room, so a teammate's action counts for everyone.

Completed By is on every element, and only Item On Target reacts to it. The other elements see only the local player's own input (their clicks, their body, their inventory, their quiz, their video, POI or panel), so Any Player and Local Player Only behave alike there: a teammate completes the room's task from their own client with either value. Item On Target is different because its detector sees every player's items and tools: with Local Player Only a teammate's item is ignored on your client, and the client of the player who acted reports it.

Custom logic​

For a door, a valve or a panel that no element covers, report on the task yourself: a Task Step, the Tasks API, or the Visual Scripting nodes Complete Task With Result and Report Attempt.

What not to do​

  • Do not wire a task listener or a detector for an action an element covers. The element does it and the procedure sees the result.
  • Do not leave a Target or a Choice without its Interactable or its Visual Scripting Interactable. The element logs a warning and nothing completes it.
  • Do not use a Reach Zone without a trigger collider.
  • Do not use a Distractor with a task when you want Penalty Points. They apply only without a task.
  • Do not expect Completed By to restrict who completes an element other than Item On Target. See Shared procedures.