GAME 1303 — Deployment & Integration Guide

110 scripts across 8 tiers. This document is what you need to get them into Unity, build a .unitypackage, and know what to check when something doesn't compile.

Written for Unity 6 with the Input System, Cinemachine 3, TextMeshPro, and (for Detective Liz only) URP 2D lighting. Every deviation for Unity 2022 is listed in §9.


1. Import order — this matters

The scripts have real compile-time dependencies on each other. Unity compiles the whole assembly at once, so a partial import produces a wall of errors that look worse than they are. Two safe approaches:

A. Import everything (recommended for building the master package). Drop all eight Scripts folders in at once. One compile, no missing references.

B. Import tier by tier, in order. Tiers must go in 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8. Stopping partway is fine as long as you stop at a tier boundary; stopping mid-tier is not.

Apply the updates

Three Tier 1 files were revised later. Always use the newest copy — later tiers won't compile against the originals.

File Newest version lives in What changed Who needs it
PlayerController2D.cs Tier3Scripts/Tier1_Updates/ v1.1 — adds MovementLocked, SpeedMultiplier, ForceJump(), CanCoyoteJump, Facing, BaseGravity every Tier 3 movement module
Health.cs Tier3Scripts/Tier1_Updates/ v1.1 — adds SetInvulnerable(), ClearInvulnerability(), SetMaxHealth(), SetCurrentHealth() Dash, MomentumLauncher, CharacterSwapper, LightSensitiveEnemy, SaveSystem
DamageOnContact.cs Tier3Scripts/Tier1_Updates/ v1.1 — respects its enabled checkbox every Tier 4 hazard
CollectionTracker.cs Tier7Scripts/Tier1_Updates/ v1.1 — adds GetAllCounts() SaveSystem, RecipeChecker

If you import in order, each Tier1_Updates folder simply overwrites the older file. Delete the Tier1_Updates folders after copying — leaving duplicate class definitions in the project is the #1 cause of "type already defines a member" errors.

Suggested project structure

Assets/
  GAME1303/
    Scripts/
      Player/  Combat/  Level/  Collectibles/  Camera/  Managers/  UI/  Environment/
      Enemies/ Movement/ Balloon/ Special/
      Hazards/ Progression/
      Snake/   Delivery/  Maze/
      Interaction/ Dialogue/ Endings/ Light/ Puzzle/
      Pet/     Save/      Store/
      ApepsTrial/ MythoClash/ CommissionWitch/ Instructor/
    Prefabs/
    ScriptableObjects/
    Art/  Audio/

Folder layout is cosmetic in Unity (there are no namespaces in this kit), so students can reorganise freely — but a consistent structure makes your life easier when you're helping seventeen projects at once.


2. Packages, tags, layers — the setup that must exist

Package Manager

Package Needed by Notes
Input System everything Project Settings → Player → Active Input Handling = Input System Package or Both. Unity will ask to restart.
Cinemachine (3.x) every game with a moving camera CameraTargetAssigner, CameraModeSwitcher
TextMeshPro everything with UI Window → TextMeshPro → Import TMP Essentials
Universal RP Detective Liz only Needed for Light 2D. Don't install it project-wide unless you mean to — it changes how every material renders.
AI Navigation Store Simulator only NavMeshSurface for CustomerAI

Tags (Project Settings → Tags and Layers)

Player, Enemy

Player is used by 29 scripts — it's the single most load-bearing string in the kit. A forgotten tag is the most common "nothing happens" bug.

Layers

Layer Used by
Ground PlayerController2D, EnemyPatrol, WallSlideJump, Crusher, Projectile
Hitbox / Hurtbox Tier 2 combat
Metal MagnetPull
Rail RailRide
SafeLight DarknessMeter
Carryable PickupCarry (3D)
SnakeBody SnakeBody, TreatSpawner

Physics 2D collision matrix (Project Settings → Physics 2D): untick everything for Hitbox and Hurtbox except Hitbox × Hurtbox. Without this, hitboxes collide with the ground and combat behaves bizarrely.

Input Actions asset

The default Player map already has Move, Jump, Attack, Sprint, Look, Crouch, Previous, Next. Add these:

Action Type Suggested bindings Used by
Dash Button Left Shift · gamepad East Dash
Grapple Button Right Mouse · gamepad LT GrapplingHook
Magnet Button Right Mouse · gamepad LT MagnetPull
Interact Button E · gamepad South InteractionPrompt
Flashlight Button F · gamepad West Flashlight2D
Pickup Button E · gamepad South PickupCarry
Character1–4 Button 1 2 3 4 CharacterSwapper (optional)

Behavior must be "Send Messages" on every PlayerInput component. The whole kit relies on Unity calling OnMove, OnJump etc. on every component of the player object — that's how DoubleJump, WallSlideJump, LadderClimber, RailRide and GrapplingHook all hear the same Jump press and negotiate who acts.


3. ScriptableObjects — the Create menu

Eight asset types, all under Create → GAME1303 →. These are assets in the Project window, not components. Students consistently try to drag them onto GameObjects; a two-minute demo of "asset vs component" prevents a lot of confusion.

Menu item Class Make one per Referenced by
Item Type ItemType collectible kind (Coin, Nightshade, Green Electricity, Treat) Collectible, CollectionTracker, Door, LevelExit, HUDController, LevelData, CareAction, Recipe
Character CharacterDefinition playable character (4 insects, 4 party members) CharacterSwapper
Level LevelData level LevelSet, LevelSelectButton
Level Set LevelSet sector / world LevelSelectMenu
Dialogue DialogueData conversation DialogueRunner, DialogueTrigger, EndingSelector
Product ProductType shop product Carryable, ShelfSlot, CustomerAI, StoreEconomy
Monster Entry MonsterEntry MythoClash monster EncounterManager
Recipe Recipe potion order RecipeChecker

Two warnings worth repeating in class:

  1. ItemType assets are matched by asset file name in the save file. SaveSystem writes itemNames as asset.name. Renaming an ItemType asset after players have saved will silently orphan their items.
  2. LevelData.levelId is the PlayerPrefs key for cleared/best-time data. Renaming it after playtesting resets that level's progress with no warning.

Neither is a bug — it's how asset references work — but both look like bugs to a student.


4. Prefabs — what belongs in one

These are the prefabs each project actually needs. Building the first one with the student and letting them clone it is far faster than explaining it.

The player prefab (2D platformer)

Player                     [tag: Player]
├─ Rigidbody2D             Freeze Rotation Z · Gravity 3 · Continuous
├─ CapsuleCollider2D
├─ PlayerInput             Behavior: Send Messages · map: Player
├─ PlayerController2D      ← GroundCheck + Ground layer
├─ Health
├─ Animator                params: Speed, IsGrounded, YVelocity, Jump, Hurt, Dead
├─ PlayerAnimatorBridge
├─ Knockback               (if Tier 2)
├─ [Tier 3 modules]        Dash / DoubleJump / Glide / Sprint / WallSlideJump / LadderClimber
├─ GroundCheck             (empty child at the feet)
├─ Hurtbox                 (child · trigger collider · Team = Player · layer Hurtbox)
└─ AttackHitbox            (child · DISABLED · Hitbox · Target = Enemy · layer Hitbox)

The two children that trip people up: GroundCheck must be assigned in the Inspector (it isn't found automatically), and AttackHitbox must start disabled — MeleeAttack enables it for the swing window.

The enemy prefab

Enemy                      [tag: Enemy]
├─ Rigidbody2D · Collider2D · Health (Destroy On Death ✓) · Knockback
├─ EnemyPatrol             ← WallCheck + LedgeCheck children, Ground layer
├─ EnemyChase              (optional) → OnAttack wired to MeleeAttack.Attack
├─ Animator + PlayerAnimatorBridge   (the bridge works for enemies too)
├─ Hurtbox                 (child · Team = Enemy)
└─ BodyHitbox              (child · always on · Repeat Delay 1 · Target = Player)

Other prefabs by game

Prefab Components For
Collectible Sprite + trigger Collider2D + Collectible (+ ItemType) 9 games
Checkpoint trigger Collider2D + Checkpoint 12 games
Projectile Rigidbody2D + trigger Collider2D + Projectile 4 games
Hazards trigger + DamageOnContact + one hazard script Cutthroat Course etc.
SpikeTrap parent + Spikes child (collider + DamageOnContact) the child is required
Crusher parent + Head child (trigger + DamageOnContact, Instant Kill) the child is required
Door solid Collider2D + Door (+ optional ProximityZone child) 5 games
Body segment trigger Collider2D on layer SnakeBody Weenie Maze
Treat Collectible + ItemType Weenie Maze
Dropped cargo Rigidbody2D + trigger + DroppedCargo Last Delivery
Ghost Rigidbody2D (gravity 0) + FloatingEnemy + LightSensitiveEnemy + Hurtbox Detective Liz
Prompt UI world-space Canvas + TMP text any game with Interactable
Choice button UI Button + TMP child any game with dialogue choices
Product box mesh + Rigidbody + Collider + Carryable, layer Carryable Store Sim
Customer NavMeshAgent + CustomerAI Store Sim
Monster Health + Hurtbox + attack components MythoClash

Scene manager objects (not prefabs, one each per scene)

GameManager · RespawnManager · CollectionTracker · AudioManager* · SceneLoader* · ChoiceFlagManager* · SaveSystem* · DialogueRunner · HUDController · ClueJournal*

* survives scene loads via DontDestroyOnLoad — put these in your first scene only, or you'll get duplicates that destroy themselves (harmless, but confusing in the Hierarchy).


5. Dependency map — what breaks what

Hard dependencies (won't compile without)

Tier 2  →  Health, PlayerController2D, PlayerAnimatorBridge, AudioManager        (T1)
Tier 3  →  T1 v1.1 (PlayerController2D, Health), Hitbox                          (T1, T2)
Tier 4  →  Health, DamageOnContact v1.1, CollectionTracker, GameManager,
           SceneLoader, AudioManager, ItemType                                   (T1)
Tier 5  →  Health, Collectible, CollectionTracker, GameManager, AudioManager     (T1)
           ChoiceFlagManager                                                     (T4)
Tier 6  →  ChoiceFlagManager (T4), Health (T1), FuelSystem (T3),
           Hitbox/EnemyChase/FloatingEnemy (T2), TopDownMover (T5)
Tier 7  →  ChoiceFlagManager (T4), CollectionTracker v1.1 (T1/T7),
           TopDownMover (T5), ClueJournal + DialogueRunner (T6), Health (T1)
Tier 8  →  FirstPersonController (T7), PlayerController2D (T1), TopDownMover (T5),
           Health (T1), CollectionTracker v1.1, ChoiceFlagManager (T4),
           GameManager (T1)

Practical consequence: SaveSystem (T7) references ClueJournal and DialogueRunner from Tier 6. If you want Tier 7 without Tier 6, comment out those two blocks in SaveSystem.cs — they're clearly marked.

Soft dependencies (compile fine, do nothing without the partner)

Script Needs at runtime Symptom if missing
Checkpoint RespawnManager in scene checkpoints don't register
Collectible CollectionTracker in scene pickups vanish, counter stays 0
Any PlaySFX call AudioManager in scene silence (no error — null-conditional)
Door (Flag mode) ChoiceFlagManager door opens freely
LevelExit SceneLoader in scene level completes but doesn't load
Hitbox matching Hurtbox on target attacks pass through
LightSensitiveEnemy Flashlight2D on player ghosts never react
CustomerAI baked NavMesh customers spawn and stand still
ShelfSlot/Register PickupCarry on the player can't stock or serve
PersonalityTracker ChoiceFlagManager pet never develops a nature

Most of these use ?. so they fail silently rather than throwing. That's kinder for students but harder to diagnose — when something "does nothing", check for a missing manager object first.

The cross-script wiring students must do by hand

These aren't automatic, and forgetting them is the most common source of "it's broken":

Player Health.OnDied           → RespawnManager.OnPlayerDied
Player Health.OnHealthChanged  → HUDController.UpdateHealth
RespawnManager.OnLivesChanged  → HUDController.UpdateLives
RespawnManager.OnGameOver      → GameManager.GameOver
CollectionTracker.OnCountChanged → HUDController.UpdateItemCount
AttackHitbox.OnHit             → ComboCounter.RegisterHit        (Stardust)
Player Health.OnDamaged        → ComboCounter.ResetCombo         (Stardust)
EnemyChase.OnAttack            → MeleeAttack.Attack
LevelExit.OnCompleted          → LevelTimer.StopAndRecord        (Zap Attack)
Interactable.OnInteract        → DialogueRunner.StartDialogue
RespawnManager.OnRespawned     → PushBlock.ResetPosition         (puzzle games)
RespawnManager.OnRespawned     → CharacterSwapper.ReviveAll      (Roach Invasion)
Health.OnDied                  → CharacterSwapper.OnCurrentCharacterDied  (Roach Invasion,
                                 INSTEAD of RespawnManager.OnPlayerDied)

6. Building the .unitypackage

  1. New empty 2D (URP) project — URP so Detective Liz works; other students simply won't use Light 2D.
  2. Install the packages from §2.
  3. Create the tags, layers, and the Physics 2D matrix.
  4. Import all eight Scripts folders, apply the four v1.1 updates, delete the Tier1_Updates folders.
  5. Compile clean before going further. Fix errors here, not in seventeen student projects.
  6. Extend the Input Actions asset with the actions from §2 and save it into the package.
  7. Build the example prefabs from §4 (at minimum: player, enemy, collectible, checkpoint).
  8. Create one example asset per ScriptableObject type so students can see the shape of them.
  9. Right-click the GAME1303 folder → Export Package → tick Include dependencies → export.

Consider exporting two packages: a Core one (Tiers 1–4 + the Input Actions asset — what every student needs) and a Full one. Seventeen students importing 110 scripts when nine of them only need forty is a lot of noise in the Project window.


7. First-run smoke test

A scene that exercises the most-shared code in about ten minutes:

  1. Tilemap floor on layer Ground.
  2. Player prefab per §4. Play — walk and jump. (T1)
  3. Add a spike: sprite + trigger + DamageOnContact (Instant Kill). Walk into it. (T1)
  4. Add RespawnManager, wire Health.OnDied. Die → respawn. (T1)
  5. Add a Checkpoint, walk over it, die past it. (T1)
  6. Add a Cinemachine 2D camera + CameraTargetAssigner. Camera follows. (T1)
  7. Add an ItemType + Collectible + CollectionTracker + HUDController. Counter increments. (T1)
  8. Add an enemy per §4. It patrols, hurts you, you can kill it with MeleeAttack. (T2)
  9. Add Dash and DoubleJump to the player. Both work; jump chain resolves correctly. (T3)
  10. Add a SpikeTrap (Timed) and a Door requiring 3 of your ItemType. (T4)
  11. Add an Interactable + DialogueRunner + a two-line DialogueData with one choice. (T6)

If all eleven pass, the shared spine is sound and remaining problems are per-game.


8. Known rough edges — check these first tomorrow

Honest list of what I'd expect to need attention, roughly in order of likelihood:

  1. Cinemachine 3 API. CinemachineCamera and cam.Priority are right for CM3, but the exact property casing has shifted between 3.0 and 3.1. Affects CameraTargetAssigner and CameraModeSwitcher.
  2. FloorTransition's confiner swap uses reflection against CinemachineConfiner2D. If the property names don't match, it fails silently (by design) — the transition still works, the camera bounds just don't update.
  3. Jump ownership chain (T3). DoubleJump, WallSlideJump, LadderClimber, RailRide, GrapplingHook all receive the same OnJump. I've ordered the guards deliberately, but this needs real play-testing with several modules stacked.
  4. RailRide segment walking. The polyline traversal maths is the most intricate code in the kit and the least testable by reading.
  5. SnakeBody growth timing. The path queue keeps segments.Count + 2 entries; if growth looks like a gap, that buffer is the place to look.
  6. MagnetPull force tuning. The pull strength curve is guesswork without playing it — expect to tune pullForce and the damping factor.
  7. Register / ShelfSlot read the E key directly rather than through PlayerInput, because they're not on the player object. Works, but rebinding interact won't affect them.
  8. CameraModeSwitcher puts a CharacterController and a Rigidbody2D on one object. Correct as long as one controller is enabled at a time, but worth watching for jitter at the switch.
  9. Breakable's Min Damage To Break heals back damage that's too weak. Works, but it'll briefly show a health change — if that reads badly, it needs a pre-check instead.
  10. TMP references. Anything with using TMPro; fails to compile until TMP Essentials are imported. That's the most likely cause of a first-import error wall.

9. Unity 2022 (or earlier) changes

If any student is on an older version:

Unity 6 / 2023+ Unity 2022 Files
rb.linearVelocity rb.velocity most movement scripts
rb.linearDamping rb.drag PushBlock, BalloonController
using Unity.Cinemachine · CinemachineCamera using Cinemachine · CinemachineVirtualCamera CameraTargetAssigner, CameraModeSwitcher
FindFirstObjectByType<T>() FindObjectOfType<T>() CharacterSwapper, DialogueTrigger, SaveSystem, CustomerAI, CustomerSpawner, ModeSwitchTrigger
FindObjectsByType<T>(sortMode) FindObjectsOfType<T>() SaveSystem, CustomerAI, Register
Collider2D.Overlap(filter, results) OverlapCollider(filter, results) SpikeTrap, Door

A find-and-replace across the folder handles all six. I'd rather standardise the class on Unity 6 than maintain both.


10. For tomorrow

Send me the compiler errors verbatim — file, line, and message. Unity's first error is usually the real one and the rest are cascade; the fastest path is to fix the top error and recompile rather than working down the list.

If a script compiles but misbehaves, the most useful thing you can tell me is which of the three layers it's failing at: does the component exist and is it enabled, are its Inspector references assigned, and are the UnityEvents wired? Roughly three quarters of "it doesn't work" in this kit is the third one.