unity check if scene can be loaded code example
Example: unity check if current scene is being unloaded
//If the scene is being unloaded, this will return false
SceneManager.GetActiveScene().isLoaded
//If the scene is being unloaded, this will return false
SceneManager.GetActiveScene().isLoaded