using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[RequireComponent(typeof(Button))]
public class ButtonResponse : MonoBehaviour
{
 void Awake()
 {
 var button = GetComponent<Button>();
 // button.onClick.AddListener(OnClickButton2);
   button.onClick.AddListener(() => SceneManager.LoadScene("MainScene"));
 }
public void OnClickButton2()
  {
// Debug.Log("Click Button");
  SceneManager.LoadScene("MainScene");
 }
 void Start()
    {
    }
 void Update()
    {
    }
}