> ## Documentation Index
> Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
> Use this file to discover all available pages before exploring further.

# TourSubsystem

> Additive tour areas, spot teleport, and home scene routing.

**File:** `Assets/_MolcaSDK/_VR/Scripts/Scenario/Tour/TourSubsystem.cs`\
**Namespace:** `MolcaSDK.VR.Scenario.Tour`\
**Type:** [RuntimeSubsystem](/core/runtime-subsystem) on [RuntimeManager](/core/runtime-manager)

## When to use

Use this when building VR training content that needs Tour Subsystem functionality.

## Role

* Loads / unloads **tour areas** (often additive scenes)
* Teleports between **spots**
* **`SharedString` home scene** for returning to lobby
* Optional **keep-loaded** radius when leaving an area (reduces reload churn)

Works with [Tour area and spots](/vr/tour/tour-area-and-spots) and the [Tour scenario mode driver](/vr/scenario-mode-drivers).

## Runtime flow (simplified)

```mermaid theme={null}
flowchart TD
  Start[Tour scenario active] --> Area[Load / switch TourAreaManager]
  Area --> Spot[Teleport to TourSpotController]
  Spot --> Mat[View materials at spot]
  Mat --> Prog[Post progress via session]
  Prog --> More{More spots / areas?}
  More -->|yes| Area
  More -->|no| Done[Tour complete]
  Done --> Home[Load home SharedString scene]
```

## Code

Resolve from anywhere after init:

```csharp theme={null}
using Molca;
using MolcaSDK.VR.Scenario.Tour;

public static class TourApi
{
    public static TourSubsystem Subsystem => RuntimeManager.GetSubsystem<TourSubsystem>();

    public static async Awaitable<bool> GoToArea(TourScenarioData data) =>
        await Subsystem.TransitionToAreaAsync(data);

    public static void Jump(TourSpotController spot) => Subsystem.TeleportToSpot(spot);

    public static async Awaitable<bool> ExitToLobby() => await Subsystem.EndTourAndGoHomeAsync();
}
```

**`homeScene`** (**SharedString**) names the scene **`EndTourAndGoHomeAsync`** loads. **`maxDistanceToKeepAreaLoaded`** keeps an unloaded area’s additive scene in memory if the player remains within range of that area’s spots. **`TeleportToSpot`**, **`SetInitialArea`**, **`LoadAreaSceneAdditivelyAsync`**, **`UnloadDistantInactiveAreaScenesAsync`** cover advanced flow; **`OnAreaChanged`**, **`OnSpotTeleported`**, **`OnError`** are **`UnityEvent`** hooks.

## Troubleshooting

* **Transition fails** — **`TourScenarioData`** null or **Addressables** / scene name mismatch; check **`OnError`** and console for **`[TourSubsystem]`** messages.
* **Teleport does nothing** — **`TourSpotController`** needs **`TeleportationAnchor`**; ensure XRI teleport provider is active.
* **Home scene wrong** — Set **`SharedString`** on the subsystem so **`value`** matches a **Build Settings** scene name (or your loader contract).
* **Memory / load churn** — Tune **`maxDistanceToKeepAreaLoaded`** or call **`UnloadDistantInactiveAreaScenesAsync`** after teleports if you manage areas manually.

## Related

* [VR content hierarchy](/vr/sdk-content-hierarchy) — tour vs simulation trees
* [Tour area and spots](/vr/tour/tour-area-and-spots)
* [Scenario mode drivers](/vr/scenario-mode-drivers) — tour driver
* [VR player manager](/vr/vr-player-manager) — ground position for distance checks
* [Session authentication](/vr/session-authentication) — **`ScenarioSessionManager`** for tour posts

## Unity Editor

<Frame hint="RuntimeManager prefab → TourSubsystem with home SharedString and distance fields." caption="TourSubsystem on RuntimeManager prefab">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/ptmolcateknologinusantara/images/features/vr/tour/tour-subsystem-inspector.png" alt="TourSubsystem in Unity Inspector" />
</Frame>
