using System.Collections; using System.Collections.Generic; using Mono; using UnityEngine; public class AppLauncher : MonoBehaviour { private bool _isStart; void Start() { GameObject prefab = Resources.Load("Canvas"); GameObject _gameObject = GameObject.Instantiate(prefab); UIManager.Instance.SetUIRoot(_gameObject); ConfigComponent.Instance.Preload(); _isStart = true; _timer = 0; } private float _timer; // Update is called once per frame void Update() { if (_isStart) { _timer += Time.deltaTime; if (_timer >= 15) { UIManager.Instance.LoadAndOpenPanel(UIManager.UILayer.Middle); _isStart = false; _timer = 0; } } } }