Play this transition effect.
public void AnimateTransitionTo(bool targetValue, UnityAction onCompleted);
| targetValue | If true, the transition will be animated from 0 to 1. If false, from 1 to 0. | | --- | --- | | onCompleted | Callback called when the animation is completed. |
using UnityEngine;
using UnityEngine.SceneManagement;
public class PlayTransition : MonoBehaviour
{
public SceneTransitionEffect transitionEffect;
void Start()
{
transitionEffect.AnimateTransitionTo(true, OnTransitionEnded);
}
void OnTransitionEnded()
{
Debug.Log("Transition ended!");
}
}