Files
test/Assets/PerfectWorld/Scripts/Boostrap/BoostrapSceneController.cs
T
NguyenVanDat aca798172c testfast
2025-10-28 10:31:28 +07:00

27 lines
651 B
C#

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
namespace BrewMonster
{
public class BoostrapSceneController : MonoBehaviour
{
[SerializeField] private string _nextSceneName;
IEnumerator Start()
{
// Load the next scene after 1 second
yield return new WaitForSeconds(1f);
LoadNextScene();
}
private void LoadNextScene()
{
#if TESTFAST
SceneManager.LoadSceneAsync(_nextSceneName,LoadSceneMode.Additive);
#else
SceneManager.LoadScene(_nextSceneName);
#endif
}
}
}