No edit summary
No edit summary
Line 1: Line 1:
The '''main menu''' is the first interactive screen in '''PC Simulator''' after the '''Menu''' scene loads. It is driven by the <code>MainMenu</code> behaviour, which initializes localization, restores settings, coordinates child pages through <code>MenuManager</code>, and starts asynchronous scene loads behind a '''Loading''' screen.
= Main menu =


{| style="float:right; width:300px; margin:0 0 1em 1em; border-collapse:collapse; border:1px solid #a7a7a7; background:#f8f9fa; font-size:92%;"
When you start '''PC Simulator''', the first place you land is the '''main menu'''. This is where you choose what to do next—open a [[Save]], try the [[Tutorial]] (if the game nudges you), change options, or quit back to your desktop.
|+ style="background:#eaecf0; border:1px solid #a7a7a7; padding:6px; font-weight:bold;" | Quick facts
 
|-
The menu is part of the '''Menu''' scene in the game build. For how saves are stored and edited outside the game, see [[Save]] and [[Save Editor]]; for oddities and easter eggs that sometimes touch the menu flow, see [[Secrets]] and [[Achievements:The Hidden Room]].
| style="border:1px solid #a7a7a7; padding:6px; vertical-align:top; width:38%;" | '''Unity scene'''
 
| style="border:1px solid #a7a7a7; padding:6px;" | <code>Menu</code> (project: <code>Assets/Scenes/Menu.unity</code>)
{| style="float:right; width:280px; margin:0 0 1em 1em; border-collapse:collapse; border:1px solid #c8ccd1; background:#f8f9fa; font-size:92%;"
|+ style="background:#eaecf0; border:1px solid #c8ccd1; padding:6px; font-weight:bold;" | At a glance
|-
|-
| style="border:1px solid #a7a7a7; padding:6px; vertical-align:top;" | '''Core scripts'''
| style="border:1px solid #c8ccd1; padding:6px;" | '''Feels like'''
| style="border:1px solid #a7a7a7; padding:6px;" | <code>MainMenu.cs</code>, <code>MenuManager.cs</code>, <code>FileMenu.cs</code>
| style="border:1px solid #c8ccd1; padding:6px;" | A hub: pick a save, learn the ropes, or adjust the game before you play
|-
|-
| style="border:1px solid #a7a7a7; padding:6px; vertical-align:top;" | '''Singleton'''
| style="border:1px solid #c8ccd1; padding:6px;" | '''Saves'''
| style="border:1px solid #a7a7a7; padding:6px;" | <code>MainMenu.Instance</code>
| style="border:1px solid #c8ccd1; padding:6px;" | Your <code>.pc</code> files — see [[Save]]
|-
|-
| style="border:1px solid #a7a7a7; padding:6px; vertical-align:top;" | '''Save loads'''
| style="border:1px solid #c8ccd1; padding:6px;" | '''Money vs crypto'''
| style="border:1px solid #a7a7a7; padding:6px;" | <code>SaveManager.Loader</code> + scene <code>startRoomSceneIndex + GameData.room</code>
| style="border:1px solid #c8ccd1; padding:6px;" | In-game cash and [[Bitcoin]] (mining apps tie into [[EZ Mining]])
|-
|-
| style="border:1px solid #a7a7a7; padding:6px; vertical-align:top;" | '''Examples'''
| style="border:1px solid #c8ccd1; padding:6px;" | '''Small touch'''
| style="border:1px solid #a7a7a7; padding:6px;" | <code>StreamingAssets/Examples/*.pc</code>
| style="border:1px solid #c8ccd1; padding:6px;" | The title blinks, a bit like a cursor
|}
|}


== Overview ==
<div style="clear:both;"></div>
 
The main menu is the hub for:
 
* Opening and starting games from user '''save files''' (<code>.pc</code>) in the save folder
* Launching the '''Tutorial''' scene and recording that the current tutorial revision was shown
* Loading '''example''' presets from streaming assets (e.g. <code>Classic.pc</code>, versioned examples, <code>Hidden Room.pc</code> when triggered from in-game)
* Navigating sub-pages (options, language, about, file tools, etc.) via a stacked UI managed by <code>MenuManager</code>
* Quitting the application where supported
 
The title line alternates every 0.5 seconds between <code>PC Simulator</code> and <code>PC Simulator_</code>, with <code>PC</code> in orange using Unity UI Rich Text.
 
== Localization ==
 
On <code>Awake</code>, <code>MainMenu</code>:
 
# Calls <code>Localization.CreateContent()</code>
# Sets language from <code>PlayerPrefs</code> key <code>"Language"</code>, or from <code>Application.systemLanguage</code> mapped to codes such as <code>EN</code>, <code>DE</code>, <code>ZH-CN</code>, <code>JA</code>, etc.
# Subscribes to <code>Localization.LanguageChanged</code> to write the active language back to <code>PlayerPrefs</code>
 
== Settings restored at menu start ==
 
<code>Start</code> restores:
 
* '''FPS''' — <code>FpsSetting.RestoreSetting()</code>
* '''Resolution''' — <code>ResolutionSetting.RestoreSetting()</code>
* '''Volume''' — <code>AudioListener.volume</code> from <code>PlayerPrefs "Volume"</code> (default <code>1f</code>)
 
== Tutorial prompt ==
 
If <code>PlayerPrefs.GetInt("TutorialVersion", -1)</code> is less than the inspector field <code>tutorialVersion</code>, the object <code>guideToTutorial</code> is enabled; otherwise it is hidden. Calling <code>Tutorial()</code> sets <code>TutorialVersion</code> to the current value and loads the scene named <code>"Tutorial"</code>.
 
== Navigation stack (<code>MenuManager</code>) ==
 
<code>MenuManager</code> keeps a stack of active menu <code>GameObject</code> pages:
 
* <code>ShowMenu(string pageName)</code> — finds a child whose '''hierarchy name''' equals <code>pageName</code> (e.g. <code>Loading</code>, <code>FileInformation</code>), hides the previous top if different, pushes and shows the new page
* <code>Back()</code> — pops one level if the stack has more than one entry, reactivates the previous page
* <code>HideMenu(bool hide)</code> — toggles visibility of the top page without changing the stack
 
Optional UI click sounds can play on <code>ShowMenu</code> and <code>Back</code> when enabled in the inspector.
 
Scene loads always call <code>ShowMenu("Loading")</code> first so the loading panel is visible during the async operation.
 
== Loading screen behaviour ==
 
Loads use <code>SceneManager.LoadSceneAsync</code> with <code>allowSceneActivation == false</code> until progress reaches <code>0.9f</code>.
 
* Displayed percent: <code>Mathf.Clamp01(operation.progress / 0.9f) * 100f</code>
* When <code>progress >= 0.9f</code>, the text shows 100%, waits '''0.5''' seconds, then sets <code>allowSceneActivation = true</code>
* Label text: localized <code>"Loading..."</code> plus a new line and <code>[percentage%]</code>
 
== Save files and examples ==


=== User saves (<code>FileMenu</code>) ===
== What you can do here ==


* Scans the save directory for files matching the save extension
* '''Load a game''' — Your saves show up as a list (newest usually first). Hardcore runs may show a little marker so you don’t mix them up with normal runs.
* Sorts by '''last write time''', newest first
* '''Tutorial''' — If you haven’t seen the latest tutorial revision, the game may suggest it. Accepting marks that version as “seen” so it won’t keep asking every launch.
* Each slot shows <code>GameData.roomName</code> and a '''Hardcore''' marker when <code>GameData.hardcore</code> is true
* '''Settings''' — Things like language, resolution, and frame rate options get applied early so the menu already matches how you like to play.
* Clicking the name runs <code>MainMenu.Instance.LoadFile(loader)</code>, which sets <code>SaveManager.Loader</code> and loads build index <code>startRoomSceneIndex + GameData.room</code>
* '''Volume''' — Master volume from your last session is restored before you hear much audio.
* '''Import a save''' — You can pull in a <code>.pc</code> file from somewhere else (handy if you’re [[Modding]] or sharing with friends). Bad or incompatible files show a clear error instead of silently breaking.
* '''Quit''' — Closes the game on builds that support it (in the editor it often does nothing visible).


=== Example presets ===
== How starting a game works (simple) ==


<code>LoadExample(string name)</code> reads <code>StreamingAssets/Examples/</code> + name + <code>.pc</code>. On Android and WebGL the file is read via <code>UnityWebRequest</code>; elsewhere via <code>File.ReadAllText</code>. The string is parsed with <code>DataLoader.LoadFromString</code>, then the same <code>LoadFile</code> path as a normal save.
# You pick a save row (or the game loads a preset / example file).
# The game stores “use this file” for the next scene.
# You’re sent to the '''room''' that save belongs to—not every save uses the same room layout.


=== Scene index convention ===
Some [[Secrets]] or special triggers load an example file (for instance content tied to [[Achievements:The Hidden Room]]). Under the hood that’s the same pipeline as opening a normal [[Save]], just reading from a different folder.


<code>LoadScene(int sceneBuildIndex)</code> loads <code>startRoomSceneIndex + sceneBuildIndex</code>. Saves store a small integer <code>room</code>; the inspector base index aligns that id with the correct Unity scene in build order.
== In-depth ==


=== Exit ===
This section is for readers who want '''exact behaviour''' and '''script names'''. It matches the decompiled / project logic; if you’re digging through assets, see [[Decompile]] and [[Modding]].


<code>Exit()</code> calls <code>Application.Quit()</code> (no visible effect in the Unity Editor).
=== Scripts and roles ===


== Implementation reference ==
{| style="border-collapse:collapse; width:100%; border:1px solid #c8ccd1;"
 
{| style="border-collapse:collapse; width:100%; border:1px solid #a7a7a7;"
|+ style="caption-side:top; text-align:left; font-weight:bold; padding:4px 0;" | Components
|- style="background:#eaecf0;"
|- style="background:#eaecf0;"
! style="border:1px solid #a7a7a7; padding:8px; text-align:left; width:22%;" | Script
! style="border:1px solid #c8ccd1; padding:8px; text-align:left; width:22%;" | Script
! style="border:1px solid #a7a7a7; padding:8px; text-align:left;" | Role
! style="border:1px solid #c8ccd1; padding:8px; text-align:left;" | Role
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | <code>MainMenu</code>
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>MainMenu</code>
| style="border:1px solid #a7a7a7; padding:8px;" | Singleton; localization; tutorial gating; title blink (<code>InvokeRepeating</code> every 0.5 s); example and scene loading; quit
| style="border:1px solid #c8ccd1; padding:8px;" | Singleton (<code>MainMenu.Instance</code>). Initializes [[Localization]] (below), restores FPS/resolution, handles tutorial version gating, blinks the title, loads scenes and example files, calls <code>Application.Quit</code>.
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | <code>MenuManager</code>
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>MenuManager</code>
| style="border:1px solid #a7a7a7; padding:8px;" | Stack of menu pages; show, back, hide; optional click sound
| style="border:1px solid #c8ccd1; padding:8px;" | Stack of active menu <code>GameObject</code> pages. <code>ShowMenu(string)</code> finds a child whose '''hierarchy name''' matches the string (e.g. <code>Loading</code>). <code>Back</code> pops one level. <code>HideMenu</code> toggles the top without popping. Optional click sounds.
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | <code>FileMenu</code>
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | <code>FileMenu</code>
| style="border:1px solid #a7a7a7; padding:8px;" | Lists saves, rename/metadata UI, delete, import external <code>.pc</code>
| style="border:1px solid #c8ccd1; padding:8px;" | Scans the save directory for <code>.pc</code> files, sorts by last write time, builds UI rows, supports rename/metadata via <code>FileInformation</code>, delete, and import through a native file picker.
|}
|}


== In-depth: source code ==
=== Localization ===
 
=== <code>MainMenu.cs</code> — lifecycle ===
 
==== <code>Awake</code> ====
 
* Sets <code>MainMenu.Instance</code> so other scripts (e.g. <code>FileMenu</code>, <code>HiddenRoom</code>) can invoke <code>LoadFile</code> / <code>LoadExample</code> without serialized references.
* Runs localization setup and applies stored or system-default language.
* Persists language changes through <code>Localization.LanguageChanged</code>.
 
==== <code>Start</code> ====
 
* Restores FPS and resolution from saved settings.
* Shows or hides the tutorial guide based on <code>TutorialVersion</code> vs <code>tutorialVersion</code>.
* Applies master volume to <code>AudioListener</code>.
* Starts the repeating title animation.
 
==== <code>Blinking</code> ====
 
Toggles between two Rich Text strings on the title <code>Text</code> component for a blinking underscore effect.
 
==== <code>LoadExample(string name)</code> ====
 
Resolves <code>StreamingAssets/Examples/{name}.pc</code>, reads file bytes as text (platform-specific), then <code>DataLoader.LoadFromString</code> and <code>LoadFile</code>. On Android/WebGL the implementation uses <code>UnityWebRequest</code> and waits synchronously for completion.
 
==== <code>LoadFile(DataLoader loader)</code> ====
 
Assigns <code>SaveManager.Loader = loader</code> and loads <code>startRoomSceneIndex + loader.GameData.room</code>.
 
==== <code>Tutorial()</code> ====
 
Writes <code>PlayerPrefs "TutorialVersion"</code> and loads the <code>"Tutorial"</code> scene by name via <code>LoadScene(string)</code>.
 
==== <code>LoadAsync</code> coroutine ====
 
# Shows the <code>Loading</code> menu page by name.
# Holds <code>allowSceneActivation</code> false while updating <code>loadingText</code> from async <code>progress</code>.
# After <code>0.9f</code> progress, shows 100%, waits 0.5 s, then allows activation.
 
=== <code>MenuManager.cs</code> ===
 
==== <code>Start</code> ====
 
Initializes the stack: whichever entry in the <code>menus</code> array is already active is pushed as the initial page.
 
==== <code>ShowMenu(string pageName)</code> ====
 
Linear search for <code>menu.name == pageName</code>. If the stack top is a different object, deactivate it, push the new page, activate it. Same reference as current top results in no duplicate push.


==== <code>Back</code> ====
On <code>Awake</code>, <code>MainMenu</code> calls <code>Localization.CreateContent()</code>, sets language from <code>PlayerPrefs "Language"</code> or maps <code>Application.systemLanguage</code> to a short code, and subscribes to language changes to persist the choice. See also the standalone page [[Localization]] for strings and language list detail if you document it there.


If <code>menuStack.Count <= 1</code>, return. Otherwise pop, deactivate popped page, activate new top.
=== Tutorial gating ===


==== <code>HideMenu(bool hide)</code> ====
<code>PlayerPrefs.GetInt("TutorialVersion", -1)</code> is compared to an editor field <code>tutorialVersion</code>. If the stored value is lower, <code>guideToTutorial</code> is shown. <code>Tutorial()</code> writes the current version and loads the <code>"Tutorial"</code> scene by name.


Sets <code>SetActive(!hide)</code> on the stack top without popping.
=== Loading screen ===


=== <code>FileMenu.cs</code> ===
Any menu-driven scene load shows the <code>Loading</code> page first, then runs an async load coroutine: progress is mapped from Unity’s <code>0…0.9</code> range to a 0–100% display; at <code>0.9</code> it shows 100%, waits 0.5s, then allows scene activation. See [[Loading screen]] for a dedicated write-up if you split it out.


==== <code>Start</code> ====
=== Save load path ===


Enumerates save files, maps path → last write time, sorts descending, calls <code>AddSlot</code> for each. Shows <code>empty</code> when the list is empty.
<code>LoadFile(DataLoader loader)</code> assigns <code>SaveManager.Loader = loader</code> and loads build index <code>startRoomSceneIndex + GameData.room</code>. The base index is set in the inspector so save data only needs a small room id. Full format notes belong on [[Save]].


==== <code>AddSlot(string path)</code> ====
=== Example / preset loads ===


Wrapped in try/catch; failures are skipped. Instantiates a row, binds <code>roomName</code> and hardcore flag, wires '''Edit''' to file information and '''Name''' to <code>MainMenu.Instance.LoadFile</code>.
<code>LoadExample(string name)</code> reads <code>StreamingAssets/Examples/{name}.pc</code>. On Android/WebGL it uses <code>UnityWebRequest</code>; elsewhere <code>File.ReadAllText</code>. Parsed with <code>DataLoader.LoadFromString</code>, then the same <code>LoadFile</code> as user saves. Document bundled filenames on [[StreamingAssets]] if you list them.


==== <code>RefreshLoadButton</code> / <code>DeleteLoadButton</code> ====
=== File import (<code>FileMenu.Import</code>) ===


Refresh updates labels after metadata changes. Delete removes the file, destroys the row, updates empty state.
Native picker filtered to <code>.pc</code>, read permission check, <code>DataLoader.LoadFromPath()</code> validation (failure message mentions compatibility with version 1.7.0+), then <code>File.Copy</code> into the save folder via <code>SaveUtility.GetNewPath</code>, destroy old rows, rescan folder.


==== <code>Import</code> ====
=== Related systems ===


Uses native file picker filtered to <code>.pc</code>. Verifies read permission, validates via <code>DataLoader.LoadFromPath</code>, copies into the save folder with <code>SaveUtility.GetNewPath</code>, then clears and rebuilds the slot list from disk.
* '''In-game pause''' uses the same hide/show idea for UI; short page: [[Pause menu]].
* '''Gallery''' for menu screenshots: [[Gallery]].
* '''Credits / people''': [[Cheng Yi-Ming]], [[Yiming Connect]], [[VerdiX]] (link where your wiki places engine or services context).
* '''Wiki conduct''': [[PC Simulator Unofficial Wiki:Rules]].


=== Data flow summary ===
=== Data flow (quick reference) ===


{| style="border-collapse:collapse; width:100%; border:1px solid #a7a7a7;"
{| style="border-collapse:collapse; width:100%; border:1px solid #c8ccd1;"
|- style="background:#eaecf0;"
|- style="background:#eaecf0;"
! style="border:1px solid #a7a7a7; padding:8px; text-align:left; width:28%;" | Action
! style="border:1px solid #c8ccd1; padding:8px; text-align:left; width:28%;" | Trigger
! style="border:1px solid #a7a7a7; padding:8px; text-align:left;" | Code path
! style="border:1px solid #c8ccd1; padding:8px; text-align:left;" | What runs
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | Player starts a save from the list
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Click save name
| style="border:1px solid #a7a7a7; padding:8px;" | <code>MainMenu.LoadFile</code> → <code>SaveManager.Loader</code> → async load <code>startRoomSceneIndex + room</code>
| style="border:1px solid #c8ccd1; padding:8px;" | <code>MainMenu.LoadFile</code> → <code>SaveManager.Loader</code> → async <code>startRoomSceneIndex + room</code>
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | Example or secret loads a preset
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Example / secret preset
| style="border:1px solid #a7a7a7; padding:8px;" | <code>LoadExample</code> reads <code>StreamingAssets/Examples/&lt;name&gt;.pc</code> → <code>LoadFile</code>
| style="border:1px solid #c8ccd1; padding:8px;" | <code>LoadExample</code> from streaming path → <code>LoadFile</code> (same as save)
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | Any scene load from menu
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Any menu scene transition
| style="border:1px solid #a7a7a7; padding:8px;" | <code>MenuManager.ShowMenu("Loading")</code> then <code>LoadAsync</code>
| style="border:1px solid #c8ccd1; padding:8px;" | <code>ShowMenu("Loading")</code> then async coroutine
|-
|-
| style="border:1px solid #a7a7a7; padding:8px; vertical-align:top;" | Player confirms tutorial
| style="border:1px solid #c8ccd1; padding:8px; vertical-align:top;" | Start tutorial
| style="border:1px solid #a7a7a7; padding:8px;" | <code>Tutorial()</code> updates <code>TutorialVersion</code> → load <code>"Tutorial"</code>
| style="border:1px solid #c8ccd1; padding:8px;" | Update <code>TutorialVersion</code> → <code>LoadScene("Tutorial")</code>
|}
|}


== See also ==
== See also ==


* Tutorial scene and <code>Tutorial.cs</code> in-game steps
* [[PC Simulator]] — the game this menu belongs to
* Pause menu and in-game <code>MenuManager</code> usage
* [[Save]] · [[Save Editor]] — files and external editing
* Save format: <code>DataLoader</code>, <code>GameData</code>, <code>SaveUtility</code>
* [[Secrets]] · [[Achievements:The Hidden Room]] — hidden flows that load special saves
* [[Bitcoin]] · [[EZ Mining]] — economy hooks players meet after leaving the menu
* [[Modding]] · [[Decompile]] — digging into <code>MainMenu</code> / <code>MenuManager</code> / <code>FileMenu</code>
* [[Main Page]] — wiki home


<!-- Optional: add wiki links when your wiki has pages, e.g. [[Tutorial]] -->
'''Pages to add (red links on purpose):''' [[Tutorial]] · [[Localization]] · [[Loading screen]] · [[StreamingAssets]] · [[Pause menu]]

Revision as of 18:17, 22 March 2026

Main menu

When you start PC Simulator, the first place you land is the main menu. This is where you choose what to do next—open a Save, try the Tutorial (if the game nudges you), change options, or quit back to your desktop.

The menu is part of the Menu scene in the game build. For how saves are stored and edited outside the game, see Save and Save Editor; for oddities and easter eggs that sometimes touch the menu flow, see Secrets and Achievements:The Hidden Room.

At a glance
Feels like A hub: pick a save, learn the ropes, or adjust the game before you play
Saves Your .pc files — see Save
Money vs crypto In-game cash and Bitcoin (mining apps tie into EZ Mining)
Small touch The title blinks, a bit like a cursor

What you can do here

  • Load a game — Your saves show up as a list (newest usually first). Hardcore runs may show a little marker so you don’t mix them up with normal runs.
  • Tutorial — If you haven’t seen the latest tutorial revision, the game may suggest it. Accepting marks that version as “seen” so it won’t keep asking every launch.
  • Settings — Things like language, resolution, and frame rate options get applied early so the menu already matches how you like to play.
  • Volume — Master volume from your last session is restored before you hear much audio.
  • Import a save — You can pull in a .pc file from somewhere else (handy if you’re Modding or sharing with friends). Bad or incompatible files show a clear error instead of silently breaking.
  • Quit — Closes the game on builds that support it (in the editor it often does nothing visible).

How starting a game works (simple)

  1. You pick a save row (or the game loads a preset / example file).
  2. The game stores “use this file” for the next scene.
  3. You’re sent to the room that save belongs to—not every save uses the same room layout.

Some Secrets or special triggers load an example file (for instance content tied to Achievements:The Hidden Room). Under the hood that’s the same pipeline as opening a normal Save, just reading from a different folder.

In-depth

This section is for readers who want exact behaviour and script names. It matches the decompiled / project logic; if you’re digging through assets, see Decompile and Modding.

Scripts and roles

Script Role
MainMenu Singleton (MainMenu.Instance). Initializes Localization (below), restores FPS/resolution, handles tutorial version gating, blinks the title, loads scenes and example files, calls Application.Quit.
MenuManager Stack of active menu GameObject pages. ShowMenu(string) finds a child whose hierarchy name matches the string (e.g. Loading). Back pops one level. HideMenu toggles the top without popping. Optional click sounds.
FileMenu Scans the save directory for .pc files, sorts by last write time, builds UI rows, supports rename/metadata via FileInformation, delete, and import through a native file picker.

Localization

On Awake, MainMenu calls Localization.CreateContent(), sets language from PlayerPrefs "Language" or maps Application.systemLanguage to a short code, and subscribes to language changes to persist the choice. See also the standalone page Localization for strings and language list detail if you document it there.

Tutorial gating

PlayerPrefs.GetInt("TutorialVersion", -1) is compared to an editor field tutorialVersion. If the stored value is lower, guideToTutorial is shown. Tutorial() writes the current version and loads the "Tutorial" scene by name.

Loading screen

Any menu-driven scene load shows the Loading page first, then runs an async load coroutine: progress is mapped from Unity’s 0…0.9 range to a 0–100% display; at 0.9 it shows 100%, waits 0.5s, then allows scene activation. See Loading screen for a dedicated write-up if you split it out.

Save load path

LoadFile(DataLoader loader) assigns SaveManager.Loader = loader and loads build index startRoomSceneIndex + GameData.room. The base index is set in the inspector so save data only needs a small room id. Full format notes belong on Save.

Example / preset loads

LoadExample(string name) reads StreamingAssets/Examples/{name}.pc. On Android/WebGL it uses UnityWebRequest; elsewhere File.ReadAllText. Parsed with DataLoader.LoadFromString, then the same LoadFile as user saves. Document bundled filenames on StreamingAssets if you list them.

File import (FileMenu.Import)

Native picker filtered to .pc, read permission check, DataLoader.LoadFromPath() validation (failure message mentions compatibility with version 1.7.0+), then File.Copy into the save folder via SaveUtility.GetNewPath, destroy old rows, rescan folder.

Related systems

Data flow (quick reference)

Trigger What runs
Click save name MainMenu.LoadFileSaveManager.Loader → async startRoomSceneIndex + room
Example / secret preset LoadExample from streaming path → LoadFile (same as save)
Any menu scene transition ShowMenu("Loading") then async coroutine
Start tutorial Update TutorialVersionLoadScene("Tutorial")

See also

Pages to add (red links on purpose): Tutorial · Localization · Loading screen · StreamingAssets · Pause menu