Dark scene on " Load Next Level" on rocketboost videos

Hello,

When I restart my level after hitting the untagged item. My level restarts wonderfully as planned
but it’s darker than it was as if the lighting didn’t load.

Screenshots.
Pre Crash and level load

Post Crash and level reload

using UnityEngine;
using UnityEngine.SceneManagement;

public class CollisionDetection : MonoBehaviour
{
    
    void OnCollisionEnter(Collision other)
    {
        switch (other.gameObject.tag)
        {
            case "TakeOffPlatform":
                Debug.Log("TakeOffPlatform");
                break;
            case "LandingPlatform":
                Debug.Log("LandingPlatform");
                break;
            case "Fuel":                
                Debug.Log("Fuel");
                break;
            default:

                restartLevel();
                break;
        }
    }

    void restartLevel()
    {
        int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
        SceneManager.LoadScene(currentSceneIndex);
    }



}

the only thing I think it could be is that I’m using Linux not OSX or Windows. any hep would be fantastic

Hi @theGnuGeek,

Welcome to our community! :slight_smile:

Are there any error messages in your console during runtime? If not, stop your game and bake the lighting for each scene via Window > Rendering > Lighting Settings.

Did this fix the issue?


See also:

2 Likes

No sadly it doesn’t but, when I export the game it works fine so must be a Unity Editor bug
thank you for your help :slight_smile:

1 Like

I get the same thing in windows, so I agree it’s probably an editor bug

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms