Splash Screen Challenge

I get the spash screen to play music and load the next scene, but the terrain seems to be unlit and doesn’t change. I attached my script (Loadscene) to the Music player. Looking back, I should just assume this scene is always at the beginning. I wouldn’t need to worry about the index then.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

    public class LoadScene : MonoBehaviour
    {

    	[SerializeField] private float delay = 3f;
    	
    	// Use this for initialization
    	void Start () {
    		
    	}
    	
    	// Update is called once per frame
    	void Update () 
    	{
    		print(Time.time);
    		if (Time.time > delay)
    		{
    			int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
    			SceneManager.LoadScene(currentSceneIndex+1);
    		}
    		
    	}
    }

Privacy & Terms