Table of Contents

Create your own level

This guide walks through adding a new training level to SimLift: the data assets that describe it, the scene that plays it, and the steps that make it load from the Level Select screen and ship in the WebGL build.

A level is two things joined by one string:

  • a scenario asset (TrainingScenarioSO) that holds everything the rules need: cargo, time limit, equipment, inspection checks, scoring, guidance, progression;
  • a level scene that holds everything physical: the crane, the load, the route, workers, check points.

The scenario's Scene Name is the scene's Addressables address, which is the scene's file name. That is the only link between them. When the player picks a level, the scenario becomes ApplicationStateServiceProvider.CurrentScenario, the scene is streamed in by that name, and the scene's components read the scenario from the provider.

The quickest route is to copy the level closest to what you want and change it. Level01 is a plain lift (no Preparation phase), Level02 adds rigging selection, workers to talk to and a rigging failure, and Level_0 is the step-by-step tutorial. The rest of this guide explains what each piece is for, so you know what to change.

1. Data assets

All of these are created from Assets > Create > Crane Simulator. The shipped ones live under Assets/Scenes/SO/; keep new ones next to them.

1.1 Cargo - CargoDataSO

Create > Crane Simulator > Cargo Data (examples: SO/Equipment/Steelbeam.asset, SteelPipe.asset).

The load as the rules and the Preparation screen see it: name, description, material, actual weight (kg), dimensions (m), centre-of-gravity offset, prefab (used by the 3D preview in Preparation) and thumbnail. The weight is what the player's estimate is graded against and what the rigging capacity rules compare to. Every StandardOp scenario needs one.

1.2 Scenario - TrainingScenarioSO

Create > Crane Simulator > Training Scenario (examples: SO/Scenarios/Level 00.asset, Level 01.asset, Level 02.asset). Field by field, in Inspector order:

Group Field What to set
Scenario Information Scenario Id A unique, stable id (e.g. Level03). Progression is saved under it; do not rename it after release.
Display Name, Description, Thumbnail What the Level Select card shows.
Scene Configuration Scene Name The scene's file name, exactly (e.g. Level03). Also its Addressables address.
Scenario Type StandardOp for a lift, Tutorial for a tutorial-flagged session (completed by its tutorial sequence).
Time Limit Seconds Crane Operation time limit (minimum 10).
Objectives The one-line goal in the objective bar. Keep it short: it is one line and is cut with an ellipsis.
Guidance Mode Off, OnDemand (H toggles it; all shipped levels) or AlwaysOn.
Guidance Targeting AllIncomplete (every unfinished hint target) or CurrentObjective (only the active tutorial step's target; for tutorials).
Cargo Cargo Data The CargoDataSO from 1.1. Required.
Equipment Equipment Pool Optional. With a pool, a StandardOp level starts with the Preparation phase (HasPreparationPhase); without one, Preparation is skipped.
Validation Rule SOs The rules the player's rigging is checked against (1.5).
Progression Is Locked, Prerequisite Scenarios A locked level opens once every prerequisite has been completed with grade A- or better.
Progresses Badge, Associated Badge Whether a passing run advances a badge (BadgeSO) by a level.
Safety Tasks Safety Tasks Tasks that are not inspection questions, e.g. buzzer ("Ring the Buzzer", required). The Id must match the taskId on the scene component that completes it (1.6).
Inspection Checks Safety Checks The Y/N inspection checks this level has (1.3).
Show Safety Explanations Show a check's explanation in the guide panel after a wrong answer. On for the tutorial, off for assessment levels.
Scoring Rules (foldout) Bonuses and penalties (1.7).

1.3 Inspection checks - SafetyCheckSO

Create > Crane Simulator > Safety Check (SO/SafetyChecks/). One asset per Y/N check, shared by every level that uses it: Id, Display Name, Question, Correct Answer (Safe / NotSafe), Penalty, Wrong Answer Explanation, an optional short Results Line for the Results breakdown, and Is Required.

The scenario's Safety Checks list is the single source of truth. To give a level a check, list it there and place a SafetyCheckPoint on the item in the scene (2.6). A point whose check is not listed disables itself, so removing a check is one list edit. Reuse the existing assets where the item is the same; create a new asset only for a new item or a different right answer.

1.4 Equipment pool - EquipmentSpecSO, EquipmentPoolEntrySO, EquipmentPoolSO

Only needed for a level with a Preparation phase (examples in SO/Equipment/):

  • Equipment Spec (Create > Crane Simulator > Equipment Spec, EqSpec_*): one model of hook, sling or shackle - id, name, description, Equipment Type, Weight Capacity (breaking strength, kg) and Safety Factor (safe working load = capacity / factor), plus the icon, prefab and optional faulty prefab shown for it.
  • Equipment Pool Entry (Equipment Pool Entry, PE_*): one item on the rack - a spec plus its condition: Has Fault, Fault Type, Fault Severity and Fault Description. Severity decides the outcome: Critical fails validation (the rig snaps at lift-off), Major and Minor pass with a warning and a penalty. Write the fault description as full sentences: it reaches the Results screen verbatim.
  • Equipment Pool (Equipment Pool): the entries offered in this level and the required sling configuration. Mix sound and faulty items, and at least one correct choice per type.

1.5 Validation rules - ValidationRuleSO subclasses

Create > Crane Simulator > Validation Rules > ...: Hook Validation, Sling Validation, Shackle Validation and Weight Estimation. Each one adds a check of the player's choices and decides which Preparation tabs are shown, so only add the rules for equipment the level actually asks for (Level02 uses the sling and weight-estimation rules; examples are next to the scenarios in SO/Scenarios/).

1.6 Tutorial sequence - TutorialSequenceSO, TutorialObjectiveSO

Create > Crane Simulator > Tutorial > Tutorial Sequence and Create Tutorial objective (SO/Tutorial/). These two live in the Game layer (Game.Tutorial), not in Data.

Every level scene has a TutorialObjectiveController (on SYSTEM/TutorialManager) whose Active Objective Sequence is a TutorialSequenceSO: an ordered list of TutorialObjectiveSO steps. Even a non-tutorial level uses one for its intro and outro messages (Level1/: intro, wait, outro). A step has:

  • Id, Phase (PreOperation = Site Inspection, Operation = Crane Operation);
  • Is Informational - a message the player dismisses with Enter, rather than a task;
  • Show In Checklist, Description (checklist text) and Guidance Message (guide panel text);
  • Safety Check - optional: the step teaches that check; its point is shown only during the step and answering it completes the step;
  • Completes When Guidance Shown / Completes When Guidance Hidden / Shows Site Overview - for steps that teach the H key (see level0/guidance_on, guidance_off).

1.7 Scoring rules

The Scoring Rules foldout on the scenario holds every bonus and penalty: equipment selection and inspection, safety tasks (including Load Collision Penalty, Worker Overhead Penalty, Crane Area Penalty), time bonuses, weight-estimation bands, and Max Possible Score, which the grade is measured against. The defaults are the values the shipped levels were tuned with; set Max Possible Score to roughly what a perfect run in your level can earn, otherwise every grade comes out too low or too high.

1.8 Level Select entry - ScenarioDatabaseSO

The Level Select screen lists the scenarios of the badge the player opened: each BadgeSO has an Associated Database, a ScenarioDatabaseSO (SO/Scenarios/ScenarioDatabase.asset, used by the 08_sim badge). Add the new scenario to that list; the order of the list is the order of the cards. The Validate Database button checks for missing ids, duplicates and missing cargo.

2. The level scene

2.1 Start from a copy

Duplicate an existing level scene in Assets/Scenes/ (Ctrl+D) and rename it to the scenario's Scene Name. Until you bake it (3.3), the copy keeps using the source level's baked lighting.

What every level scene contains (root objects of Level02, the most complete level):

Object Purpose
SYSTEM/TrainingSceneController TrainingSessionController: starts the session from the current scenario and switches the phase panels.
SYSTEM/TutorialManager TutorialObjectiveController: runs the tutorial sequence (1.6).
SYSTEM/SessionEndController SessionEndConditionsController: decides success and failure (2.3).
SYSTEM/CraneInputBridge, AudioPresenter Crane input through IInputService; music and SFX per phase.
UI The level HUD: Preparation, Site Inspection and Crane Operation panels, guide panel, prompts, GuidanceLayer. A copy per scene: a HUD change has to be made in every level.
Equipment Preview Rig Camera and container for the 3D cargo preview in Preparation.
firstPersonController Variant The player.
OverheadCrane The crane. Its hook (WireHookMount) carries NL_AttachCargo.
WaypointsRoute ObjectiveRoute with its ObjectiveWaypoints (2.2).
The cargo (Cargo_steelBeam Variant, Cargo_SteelPipe) The load (2.2).
Buzzer, Button, Forklift, ForkliftWaypoints, ZoneTriggerObject The warning buzzer and the forklift hazard it prevents (2.4).
------Environment------- The shared warehouse (env.prefab, includes the PlayerBounds walls) and the steel-shop props.
NPCs, NPCWaypoint, NavMesh Surface, CraneOperationNavArea Workers and their navigation (2.5).
RiggingAssembly Builds the visible rig and runs the rigging failure (Preparation levels only, 2.3).
Global Volume, Reflection Probe, Adaptive Probe Volume Lighting (3.3).

2.2 Crane, load and route

The load. A cargo object needs a Rigidbody and, on the same GameObject, a small trigger collider where the hook may pick it up: NL_AttachCargo attaches to the Rigidbody of the trigger the hook enters, so the trigger's position is the lifting point. Put the solid collider on a child on the Load layer. Use Cargo_SteelPipe.prefab or Cargo_steelBeam Variant.prefab as a template; the pipe also has LiftPoint transforms for the sling and an AttachPointMarker disc.

The route. WaypointsRoute holds an ObjectiveRoute: an ordered list of ObjectiveWaypoints, the load's collider (Load Collider) and the drop-off marker. Each waypoint has an Advance Condition:

  • LoadLifted for the first (pickup) waypoint when the load starts inside it - it completes when the load is lifted and attached;
  • LoadInZone for the drop-off - it completes when the load stays in the waypoint's box for Required Dwell Seconds.

The route only completes when the load has also been released at the drop-off. Move the drop-off waypoint to where the load should be set down, and size its box to the load.

2.3 End conditions

SessionEndConditionsController (SYSTEM/SessionEndController) ends the run. Check its references after copying:

  • Objective Route - the route above (success);
  • Load Collision Detector - the LoadCollisionDetector on the load (collision failure; it fails on Fail On Hit Layers, i.e. Obstacle);
  • Lift Start Signal Component - the HeightSuspendLiftSignal on the load (decides when the lift has started);
  • Missed Task Hazards - the MissedTaskHazard_BuzzerForklift on Forklift (2.4);
  • Rigging Failure Controller - the RiggingFailureController on RiggingAssembly, for Preparation levels (snaps the sling when the chosen rigging failed validation); leave empty otherwise;
  • Wait For Tutorial Outro / Route Completion Objective - hold the success screen until a final tutorial message.

2.4 Safety tasks: the buzzer

The buzzer is a safety task, not an inspection check. The Button prefab has an Interactable and a CompleteSafetyTaskAction whose Task Id is buzzer, matching the scenario's Safety Tasks entry. If the player starts the lift without ringing it, MissedTaskHazard_BuzzerForklift (same Task Id) drives the forklift into the loading zone. Keep the ids identical in all three places.

2.5 Workers and navigation

  • Workers: instances of Assets/Prefabs/characters/Worker.prefab under NPCs. Each has an NPCController with a Profile (NPCBehaviorProfile, SO/Animation/: idleNPC, WalkingNPC, StationaryWorker) and the Waypoints it may walk to. A stationary worker whose profile has AvoidanceTrigger = Asked must be asked to move (F); one standing in the crane path is part of the inspection.
  • NPC waypoints: NPCWaypoint objects; give every walking worker the full list. Keep each one on the NavMesh (a waypoint without a complete path is never chosen).
  • NavMesh: rebake NavMesh Surface after moving props.
  • CraneOperationNavArea: a NavMeshModifierVolume (area CaraneArea) over the crane's operating footprint, so workers route around it, plus a trigger BoxCollider, a ZoneTrigger and a CraneAreaPenaltyTrigger that penalises the player for walking through it during Crane Operation. Resize it to the crane's working area.

2.6 Hint targets and inspection check points

  • HintTarget marks something the guidance layer (H) highlights and labels: the crane remote, the hoist and hook, the buzzer, the load, workers to talk to. Set its Label, the Phases it shows in, and Completed By (the Interactable whose use clears it). Site Overview Item and Objective are for tutorial steps.
  • SafetyCheckPoint: drop Assets/Prefabs/SafetyCheckPoint.prefab on the inspected item (it carries a trigger on the Hazard layer, an Interactable of type Question, the SafetyCheckPoint and a HintTarget), set its Check to the SafetyCheckSO, and list the same check on the scenario (1.3). Then run Tools > Validation > Safety Checks: it reports listed checks without a point, stray points, duplicate ids and missing text, opening each scenario's scene to look.

2.7 Obstacles

Anything the load or the player must not run into goes on the Obstacle layer, and its root gets an ObstacleLabel whose Display Name finishes the sentence "The load hit ..." (e.g. "a stack of I-beams"). Without a label the Results screen says "an obstacle". The prop prefabs IBeamStack (1), WideBeamStack (1), MetalRack and SM_Pipes already carry both; prefer them over unprepared meshes.

Keep the green walkways clear: Tools > Validation > Walkway Clearance (Level_0, Level01, Level02) lists props standing on them. It checks a fixed list of scenes: add yours to WalkwayClearanceCheck.LevelScenes (Assets/Editor/Validation/WalkwayClearanceCheck.cs).

3. Make it load and ship

3.1 Addressables

Level scenes are not in Build Settings; they are streamed as Addressables.

  1. In the Addressables Groups window, create a group named after the scene and give it the same settings as the Level02 group (LZ4, Use Asset Bundle Cache off - it would double the bundle in WebGL memory, include in build). The simplest way is to duplicate Level02's schema settings.
  2. Mark the scene Addressable in that group and set its address to the scene name, exactly the scenario's Scene Name.
  3. Add the scene name to AddressablesGroupLayout.LevelScenes (Assets/Editor/Build/AddressablesGroupLayout.cs).
  4. Tools > Build > Build Addressables Content (clean), then Tools > Build > Apply Addressables Group Layout (from last content build): assets the new level shares with the others move into the Shared_* groups instead of being copied into its bundle, and its bake output goes into <Level>_Lightmaps_Light, <Level>_Lightmaps_Dir and <Level>_Probes. Build content once more and check the log: no file may exceed 25 MiB (Cloudflare Pages limit; BuildOutputSizeCheck reports it after every build).

3.2 Test it

  1. Open Persistent and enter Play mode, go to the Badge Hub, open the badge and pick the level.
  2. A locked level needs its prerequisites completed with grade A- or better. In the Editor, select the Bootstrapper in Play mode and press Debug > Unlock All Levels (Cheat). In a browser build, open the page with ?devUnlock=1 (mock login only).
  3. Play every phase: Preparation (if it has a pool), Site Inspection (every check point, the buzzer, H guidance), Crane Operation (pickup, route, drop-off, a deliberate collision), and check the Results breakdown lines.

3.3 Bake the lighting

Every light in the levels is Baked, so a new or changed level needs a lighting bake: open only that scene and use Lighting > Generate Lighting. Unity writes the result to a folder with the scene's name next to it (Assets/Scenes/<Level>/). Baking makes Addressables drop the lightmap entries from the level's side groups, so run the group layout tool again afterwards (3.1, step 4). See Docs/ReleaseAndDeploy.md, section 2, for the full procedure and Tools > Lighting > Lighting Prep for checking a scene's lightmap cost before a long bake.

The bake folders are not in git (Docs/ReleaseAndDeploy.md, section 1): add the new folder to the asset archive with the others.

Checklist

  1. CargoDataSO, TrainingScenarioSO (unique id, Scene Name = scene file name), and if needed checks, pool, rules and a tutorial sequence.
  2. Scenario added to the ScenarioDatabaseSO of its badge.
  3. Scene copied and renamed; route, end-condition references, buzzer ids, workers, nav area and HUD checked.
  4. Check points placed and Tools > Validation > Safety Checks clean.
  5. Obstacles on the Obstacle layer with an ObstacleLabel.
  6. Scene addressable (address = scene name), added to AddressablesGroupLayout.LevelScenes, group layout applied.
  7. Lighting baked, group layout re-applied, bake folder archived.
  8. Played from Level Select through to Results.