document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.SceneManagement;
  4. using UnityEngine.EventSystems;
  5.  
  6. public class SceneChangeButton : MonoBehaviour, IPointerClickHandler {
  7.     [SerializeField] Object scene;
  8.  
  9.     #region IPointerClickHandler implementation
  10.  
  11.     public void OnPointerClick (PointerEventData eventData)
  12.     {
  13.         ScreenFader.FadeOut();
  14.         SceneManager.LoadScene(scene.name);
  15.         ScreenFader.FadeIn();
  16.     }
  17.  
  18.     #endregion
  19. }
');