Quick answer: Write the highest-unlocked-level value to persistent storage at the moment the level is completed, before loading the map, and have the map read that value to decide which nodes are open.

A locked next level after a clear breaks the whole progression loop. The fix is to persist the unlock immediately on completion so the map scene reads up-to-date data.

How to fix it

1. Save unlock on completion

When the level results screen confirms the clear, set highestUnlocked = Mathf.Max(highestUnlocked, levelIndex + 1) and write it with PlayerPrefs or your save file before changing scenes.

2. Read progression when the map loads

In the level-select scene's Start, load highestUnlocked and enable each node whose index is less than or equal to it. The map should be a pure view of saved progression.

3. Avoid storing it on a scene object

Do not hold the unlock count only on a level-scene MonoBehaviour; it dies on unload. Keep the authoritative value in a save or a DontDestroyOnLoad manager that the map can query.

Catching the ones you can't reproduce

The hardest version of this to fix is the one you can't reproduce — it only happens on a player's hardware, OS, driver, or save state, under conditions that simply aren't present on your machine. A report that says “it crashed” or “it froze” gives you nothing to act on, so the bug survives release after release while quietly costing you players.

Automatic error capture closes that gap. Each failure arrives with its full stack trace, the device and OS, the build number, and a breadcrumb trail of what the player did right before it broke, so even a failure you have never seen becomes a specific, reproducible issue. Fold identical failures into one signature ranked by how many players each hits, and your worklist sorts itself worst-first instead of arriving as a stream of vague complaints.

This is where a tool like Bugnet earns its place. Its SDK captures every Unity error automatically with the full stack trace plus device, OS, memory, build, and game-state context, folds duplicates into one grouped issue with an occurrence count, and ties each to the build it first appeared on — so you fix the problem that hurts the most players first and confirm it is gone when its signature disappears from the next release.

The errors you never hear about are the ones quietly costing you players. Visibility turns them into a worklist.