Munchy2007

ScreenFader12

Jun 8th, 2016
5,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment