using UnityEngine; using UnityEngine.SceneManagement; using System.Collections; public class SceneTransition : MonoBehaviour { public void StartAnimation() { Animator ani = GetComponent(); ani.SetTrigger("start"); StartCoroutine(ChangeSceneAfterAnimation()); } IEnumerator ChangeSceneAfterAnimation() { yield return new WaitForSeconds(1.5f); SceneManager.LoadScene("GameScene"); } }