- Home /
Question by
TheFuzzyketchup · Nov 06, 2015 at 03:43 PM ·
c#scenesdirectional lightscene load
Scene Loader turning off Directional Lights
I made a simple scene loader scene, but whenever it loads a level my directional lights don't seem to load in. It only happens when the scene is loaded with the Scene Loader, not when opened directly in the editor.
Here's my code:
using UnityEngine;
using System.Collections;
public class SceneLoader : MonoBehaviour {
public GameObject loadingImage;
public GameObject removeUI;
public void LoadScene(int level)
{
Application.LoadLevelAsync(level);
loadingImage.SetActive (true);
removeUI.SetActive (false);
}
}
loadingImage is an image on a canvas that says "Loading..." removeUI is the text on the level and the buttons that trigger LoadScene(); passing in level from the scene builder level order.
Comment