On Nintendo Switch, save APIs expect a valid user context and a fully initialized NintendoSDK stack before you mount or create save data. If your Unity title calls mount too early, uses the wrong save index or mount name, or assumes a user is already selected, the mount step fails even when the same code path works on other platforms.
This guide gives a deterministic order: confirm user selection, then SDK readiness, then save data specification parity, then async completion.
Problem summary
Typical symptoms:
- Save mount or save data create returns failure in Player or NX devkit builds while Editor or non-Switch platforms appear fine
- Logs or NX-target messages reference no user, invalid user, account not opened, or save data not available before your first read or write
- First-boot works after a manual user pick, but automated or fast-resume paths skip selection and never mount
- You changed save data size, index, or application id on the portal side but the runtime still uses an older spec
Root causes
-
User account not ready
Save operations run before the player account is selected and opened for the current application. This is the most common cause on first launch and on resume-from-sleep flows. -
Initialization order
Save APIs are invoked before the NintendoSDK (or your Unity plugin’s equivalent bootstrap) has finished the platform setup your SDK version requires. -
Save data identity drift
Mount name, save data index, or allocated size in code does not match the save data definition for this application and build type (development versus master). -
Wrong thread or re-entrancy
Some SDK surfaces require main-thread calls or specific callback sequencing; mounting from a worker thread or during another SDK call can fail intermittently. -
Assuming Editor behavior
Editor stubs may not enforce Switch user rules, so bugs only appear on device.
Fix (fast path)
Step 1: Serialize user selection before any save mount
- Identify every code path that can reach save load or save mount (cold start, continue button, auto-load on title screen, cloud sync handoff).
- Ensure each path waits for a definitive user handle or account-open result from your NintendoSDK Unity integration, not a cached assumption from a previous session.
- If you support quick resume, re-validate user context when returning from system menus or sleep; do not reuse a stale handle without a successful re-open path for that session.
- Gate all save I/O behind a single application-level flag such as
switchSaveReadythat flips only after user + mount success.
Verify: Add a dev-only log line immediately before mount that prints whether user selection completed and which user id (or internal index) you will pass into mount. Cold start and resume both show a consistent ready state.
Step 2: Align NintendoSDK bootstrap with your Unity entry scene
- Confirm your first loaded scene (or a dedicated bootstrap additive scene) runs the official initialization sequence for your NintendoSDK for Unity version. Do not scatter init across unrelated
Awakecalls without a documented order. - Delay save mount until after the integration signals library ready (exact API names differ by SDK drop; use the checklist in your SDK’s Unity setup guide).
- Avoid double-initialization: multiple
GameObjecthooks that each call init can leave save in a half-ready state.
Verify: On device, capture a short boot log from process start through first successful mount. There should be no save API calls above the “SDK ready” boundary.
Step 3: Match save data spec to Nintendo developer configuration
- Compare save data index, mount name (if applicable), and maximum size in code with the values configured for this application in Nintendo’s developer tools and documentation for your current program and build type.
- After changing save layout or size on the portal side, deploy a clean build to devkit and re-run mount; stale development NAND state sometimes masks spec mismatches until you reset test save data per Nintendo guidance.
- If you maintain separate dev and cert lanes, confirm you are not mixing identifiers across lanes.
Verify: One internal table (spreadsheet or JSON in repo) lists portal save spec and code constants; CI or a pre-build script fails if they diverge.
Step 4: Use one async completion path for mount
- If your bindings expose asynchronous mount or create, await or callback-gate gameplay systems that assume save is readable; do not proceed on frame counts alone.
- On failure, log the return code or exception text your SDK surfaces, then branch to a user-visible error or retry path instead of silently falling back to “no save”.
Verify: Force a slow storage path on devkit (debug menu or throttled I/O if available) and confirm the game still waits for completion before showing “Continue”.
Step 5: Isolate Editor versus Player assumptions
- Remove or guard any
#if UNITY_EDITORshortcuts that skip user selection; use conditional compilation only where the official integration documents safe stubs. - Run the full mount path on NX development hardware at least once per release candidate, not only in Editor play mode.
Verify: Device-only test checklist includes cold boot, user switch, sleep resume, and delete-save-data from system settings then relaunch.
Alternative fixes
- Multi-user kiosk or family profiles: Ensure your UI always resolves which user owns the current save slot before mount, and handle cancel or parental restrictions without calling mount with a null user.
- Day-one patch or title update: If save spec changed across updates, implement a migration that runs after successful mount of the legacy slot, not before.
- Third-party save wrappers: If you use a middleware layer on top of Nintendo save, confirm it does not call mount before your user-selection callback fires.
Prevention
- Keep a single save bootstrap module owned by one team role; code review any new
Awake/Startthat touches save. - Add a smoke test on devkit that mounts, writes a sentinel byte, unmounts cleanly, and fails the build job if the sequence errors.
- Document resume and first launch diagrams for producers so features are not added above the save-ready line without review.
Related problems and links
- Nintendo Switch NACP Metadata Validation Fails Submission - Product Code and Regional Field Fix — metadata and packaging alignment on the same platform
- Unity Cloud Save Conflict Resolution Overwrites Newer Data - Last-Write and Merge Strategy Fix — if you pair platform save with cloud merge logic
- Android ANR in Unity Splash Screen on Low-End Devices - Async Init and Main Thread Budget Fix — same discipline: defer heavy work until the right init phase
Consult the Save Data and User Accounts chapters in the NintendoSDK documentation for Unity version pinned to your project for exact API names, return codes, and threading rules.
FAQ
Why does mount work after I pick a user manually but not on auto-continue
Auto-continue often skips the asynchronous user-open path. You still need a valid user handle before mount, even when skipping the profile UI.
Can a wrong save data size cause mount failure
Yes. If the requested size or index does not match the configured save data for the application, mount or create can fail. Align code with portal configuration and rebuild.
Should save mount run in the first frame of the first scene
Usually no. Prefer a short, explicit boot sequence: SDK init, user resolution, then mount, then title logic.
Bookmark this fix for your Switch boot and certification checklist. Share it with anyone who owns first-scene initialization or platform save code.