can someone help me with this transition
hi. I am working on a cel-shaded RPG. with the start button, a transition is supposed to play, but the start transition plays when the game is started up and the end transition is played when you press play. what is supposed to happen is when the play button is pressed, the start and end transition are supposed to play back to back, at least until I get the loading screen done, then the loading screen is going to go in between start and end.
can someone please help me? the script that is shown here is the whole main menu script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour
{
public string newGameScene;
public Animator SceneTransition;
public void PlayGame()
{
StartCoroutine("LoadLevel");
}
public void QuitGame()
{
//Quits the application
Application.Quit();
}
IEnumerator LoadLevel()
{
SceneTransition.SetTrigger("Start");
yield return new WaitForSeconds(1);
SceneManager.LoadScene(newGameScene);
}
}
Your answer
Follow this Question
Related Questions
How do I transition to the same playbacktime in another animation. 0 Answers
Hello, help with animation between scenes 0 Answers
Get possible transitions from the active animator state at runtime 0 Answers
Animator State freezes 0 Answers
Whole rig moves down on transition between two animations. 0 Answers