Hardcoding level triggers is the quickest way to end up with unmaintainable code. We developed a PuzzleStateManager that acts as a central hub for every level. Clocks, Lamps, and Windows inherit from an IInteractable interface and register their current state (e.g., 'clockTime = 07:00' or 'lampActive = false') to the manager.
Rather than containing puzzle logic directly inside the exit door, the door queries the PuzzleStateManager against a list of requirements. These requirements are defined as Unity ScriptableObjects. This enables our level designer, Metehan, to construct new room criteria in the Unity inspector by simply dragging and dropping conditions (e.g., matching the clock to 7:00 AM and having the lamp turned off) without writing a single line of C# code. If all conditions match, the exit door unlocks automatically.