Skip to content

Module select menu: choose Module 1, 2 or 3 in VR - #71

Merged
RomeXO10 merged 3 commits into
mainfrom
module-select-menu
Oct 21, 2026
Merged

RomeXO10 merged 3 commits into
mainfrom
module-select-menu

Conversation

@RomeXO10

Copy link
Copy Markdown
Contributor

The app now starts on a Module Select menu in VR instead of going straight into Module 1. Each module has a card with a picture from the game.

Card Opens
1 · Be a Mosquito Module1/Scene/Startup Menu_New (Module 1's own start screen, then Main Scene)
2 · Protect the House Module2/Scene/Module_2_MainScene
3 · Health Check Module3_System/Scene/Module_3_Demo (the team's Module 3)

Below the cards are two small buttons, for the Module 2 tutorial and the GAMA/IP screen.

How to use it

  • Choose: look at a card, or move the thumbstick left/right. Press A or the trigger to start.
  • Go back: inside any module, hold B (or Y) for 1.5 seconds to return to the menu. A bar appears while you hold.
  • In the editor without a headset: arrow keys choose, Space starts, hold Escape to go back.

Module 3 is not on main yet

The Module 3 card points to the team's scene on Module-3-Demo / M3_Demo_BackUP. Until that scene is on main:

  • in an APK, the card is hidden;
  • in the editor, it is grey and says the scene is missing.

When the Module 3 branch is merged: ProjectSettings/EditorBuildSettings.asset will conflict. Take either side, then run AEDES > Rebuild Module Select Scene. The card and its picture then appear.

Other changes

  • Module 1 save reset. SaveManager and SendRecieveData found the start screen by checking "build index 0". The menu is now index 0, so they look for the scene named Startup Menu_New instead.
    • Leaving Module 1 halfway and coming back now starts a new 300-second run. Before, it continued the old timer.
  • Build list. The order is now: Module Select, Startup Menu_New, Main Scene, Module_2_MainScene, (Module 3), Tutorial_M2, IP Menu.
    • Module_2_MainScene was not in main's build list before, so Module 2 was missing from APKs.
  • Scenes load by full path, not by name. Several scenes share a name (three called "Main Scene", two called "Module_3_Demo"), so loading by name can open the wrong one.
  • Build scripts.
    • Tools/build.sh app builds the whole app with the menu, to build/Android/AEDES.apk.
    • Tools/build.sh 1 was broken: it looked for Module_1_MainScene, which no longer exists. It now builds Startup Menu_New + Main Scene.
    • The README describes both.
  • No module scene is edited. The menu is built from code, and its scene is generated by the menu command above.

Testing

Tested in Unity play mode with the playtest harness, both on this branch and merged with M3_Demo_BackUP:

  • Module 1: menu → Module 1 → game with the 300 s timer → hold B → menu → Module 1 again starts a fresh 300 s run.
  • Choosing: the thumbstick selects each card, and launching opens the right scene.
  • Going back: hold B returns to the menu from Module 1, Module 2, Module 3, the tutorial and the IP Menu, several times in one session.
  • Errors: the menu caused no errors.

Not tested on a headset yet.

Please check

  • Text: the menu's English text, and the Lao welcome line (taken from the team's Welcome UI art), need a native speaker before classroom use. All the text is in ModuleSelectText in MainMenu/Scripts/ModuleSelectMenu.cs.
  • For the Module 3 team (not caused by this PR):
    • NPC.OnTriggerEnter turns on an outline for character meshes that NPC.Awake has already deleted. This throws MissingReferenceException when the player walks up to some villagers.
    • NPC.cs has using NUnit.Framework, which can break APK builds.

SaveManager reset the run (clock and score) only when the active scene had build
index 0, and SendRecieveData used the same test to report "in the menu" to GAMA.
Index 0 is "Startup Menu_New" today only by coincidence; any scene put in front of
it (a module select menu, for one) silently stops Module 1 from ever resetting.

- Both now check for the scene named "Startup Menu_New" (SaveManager.StartScene).
- When the start screen loads while the previous run's SaveManager is still alive
  (the player left mid-run instead of playing it out), the new one replaces it and
  starts a fresh run. Before, the new one destroyed itself and the next run
  resumed the old clock.

Behaviour is unchanged for the current build order.
The app now starts on a "Module Select" scene (build index 0) instead of going
straight into Module 1's start screen, and every module is reachable from it.

- ModuleSelectMenu: a world-space VR menu built from code (no scene canvas, so
  the scene stays tiny and mergeable). Three cards, each with an in-game picture,
  in the team's palette and pill headers, the team's Lao welcome line in the
  shared Lao_SomVang Full SDF font, plus small buttons for the Module 2 tutorial
  and the GAMA/IP screen. Card text wraps and shrinks to fit. Select by looking
  at a card or with the thumbstick, A or trigger to launch. Gaze only takes over
  when the head moves onto another card, so it does not undo a thumbstick choice
  on the next frame.
- Module 1 enters through the team's "Startup Menu_New" (how-to-play slides,
  clock reset), which is also where it returns when time runs out.
- Module 3 is the team's Health Check (Module3_System/Scene/Module_3_Demo on
  Module-3-Demo / M3_Demo_BackUP): talk to villagers, check symptoms, send them
  to hospital or home. It is not on main yet, so in a player build the card is
  hidden until that scene is in the build list; in the editor it is drawn greyed
  out with the reason. When the branch merges, re-run the builder.
- ReturnToMenu: hold B/Y for 1.5 s in any module to come back. It installs itself
  via RuntimeInitializeOnLoadMethod, so no module scene is touched. The bar only
  shows after 0.3 s, and the timer adds at most 0.1 s per frame, so a tap of B
  during a frame hitch is never taken for a hold.
- AppFlow: every scene load goes by path. Names are not unique here: Module 1's
  game scene is "Main Scene", and so are two SIMPLE template scenes; the team's
  Module 3 branch has two scenes called Module_3_Demo.
- ModuleSelectSceneBuilder (AEDES > Rebuild Module Select Scene) regenerates the
  scene, wires in every picture in MainMenu/Pictures (matched to cards by name),
  and writes the build list: Module Select, Startup Menu_New, Main Scene,
  Module_2_MainScene, [Module_3_Demo], Tutorial_M2, IP Menu. It keeps other
  entries, but disables any enabled scene whose name clashes with a module scene.
  Module_2_MainScene was not in main's build list at all.

Checked in play mode via the playtest harness, on this branch and on a throwaway
merge with M3_Demo_BackUP: menu -> Module 1 start screen -> game (300 s clock) ->
hold B mid-run -> menu -> Module 1 again starts a fresh 300 s run; the stick picks
each card and launches it; hold B returns to the menu from Module 1, 2, 3, the
tutorial and the IP menu, repeatedly in one session. No exceptions from the menu.
Not yet tried on a headset.
- `Tools/build.sh app` (and deploy.sh / build-and-deploy.sh) builds the enabled
  scenes in Build Settings, i.e. the module select menu plus every module, into
  build/Android/AEDES.apk.
- `1` looked for Module_1_MainScene.unity, which main no longer has (the team's
  Module 1 renamed it "Main Scene"), so it died. It now builds Startup Menu_New
  plus Main Scene, since the game returns to the start screen when time runs out.
- README: document `app` as the build to give a class.
@RomeXO10
RomeXO10 merged commit cf0d7a7 into main Oct 21, 2026
1 check passed
@RomeXO10
RomeXO10 deleted the module-select-menu branch October 21, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant