Hi,
I have create a bundle of my scene with the AssetBundleBrowser.
The file LightingData is included in the bundle.
When I try to download and load the bundle in an other Unity project, the scene is correct but LightingData is not set in the Lighting window…
There is one more step to set the lighting data ?
Thanks
I use this script :
public class LoadScene : MonoBehaviour
{
public string url;
private void Start()
{
StartCoroutine("DownloadCoroutine");
}
private IEnumerator DownloadCoroutine()
{
using (UnityWebRequest www = UnityWebRequest.GetAssetBundle(url))
{
yield return www.Send();
if (www.isNetworkError)
{
Debug.LogFormat("[DownloadCoroutine] Error : {0} // Url : {1}", www.error, url);
}
else
{
AssetBundle lBundle = DownloadHandlerAssetBundle.GetContent(www);
string[] scenes = lBundle.GetAllScenePaths();
Debug.LogFormat("[DownloadCoroutine] Find {0} scene(s)", scenes.Length);
string scene = Path.GetFileNameWithoutExtension(scenes[0]);
SceneManager.LoadSceneAsync(scene, LoadSceneMode.Single);
}
}
}
}