using DG.Tweening; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class Bootstrapper : MonoBehaviour { [SerializeField] private Image loadingSlider; [SerializeField] private GameObject loadingBarObj; private void Start() { #if UNITY_EDITOR StartGame(); #endif } // Called from GoogleSignInManager when login is successful public void StartGame() { Debug.Log("Starting game..."); loadingBarObj.SetActive(true); loadingSlider.DOFillAmount(1f, 2.5f).OnComplete(() => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }); } }