run this:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LoadSceneAsyncInactive : MonoBehaviour
{
public SceneReference scene;
public AsyncDataPipe_SO sceneAsync_DATAPIPE;
IEnumerator Start()
{
yield return new WaitForSeconds(UnityEngine.Random.value);
var asyncLoad = SceneManager.LoadSceneAsync(scene, LoadSceneMode.Additive);
asyncLoad.allowSceneActivation = false;
sceneAsync_DATAPIPE.async = asyncLoad;
}
}
it’ll work as expected: the scene doesn’t activate
run that however
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LoadSceneAsyncInactive : MonoBehaviour
{
public SceneReference scene;
public AsyncDataPipe_SO sceneAsync_DATAPIPE;
void OnEnable()
{
var asyncLoad = SceneManager.LoadSceneAsync(scene, LoadSceneMode.Additive);
asyncLoad.allowSceneActivation = false;
sceneAsync_DATAPIPE.async = asyncLoad;
}
}
and you’ll get a scene that loads pre-activated, because hey eventually, amiright?
so the bug can be worded as : if a scene is loaded async on first frame with additive and allowactivate= false then you get activate anyway