You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Scripts/Dev/Bootstrapper.cs

20 lines
500 B
C#

using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class Bootstrapper : MonoBehaviour
{
[SerializeField] private Image loadingSlider;
// Start is called before the first frame update
void Start()
{
loadingSlider.DOFillAmount(1f, 2.5f).OnComplete(() =>
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
});
}
}