Quick answer: Unity Input System callback fires during an async scene load, accessing destroyed objects? Disable the input action map during loading screens.
Loading screen; player presses key from previous scene; callback runs on destroyed objects; crash.
Disable during load
SceneManager.sceneLoaded -> enable; SceneManager.sceneUnloaded -> disable. Input only active when valid.
Or use a state machine
States: Menu, Loading, Playing. Each state defines valid input actions.
Audit callbacks per state
What runs during loading? Only loading-screen actions. Others disabled.
“Input is always-on by default. Always-on during loading is the bug.”
Build a 'CurrentInputContext' system. Each screen sets context; input dispatches only matching actions.