Files
fatal-exception/Assets/Scripts/SceneLodarManual.cs
2020-02-02 16:28:35 -05:00

30 lines
554 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class SceneLodarManual : MonoBehaviour
{
public Button button;
// Start is called before the first frame update
void Start()
{
button.onClick.AddListener(LoadScene);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
LoadScene();
}
}
void LoadScene()
{
SceneManager.LoadScene("GameIntro");
}
}