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