// Copyright (C) 2015-2021 gamevanilla - All rights reserved.
// This code can only be used under the standard Unity Asset Store End User License Agreement.
// A Copy of the Asset Store EULA is available at http://unity3d.com/company/legal/as_terms.
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
namespace UltimateClean
{
///
/// This class is responsible for managing the transitions between scenes in the demo.
///
public class Transition : MonoBehaviour
{
private static GameObject m_canvas;
private GameObject m_overlay;
private void Awake()
{
// Create a new, ad-hoc canvas that is not destroyed after loading the new scene
// to more easily handle the fading code.
m_canvas = new GameObject("TransitionCanvas");
var canvas = m_canvas.AddComponent