Ao apertar o botao, aparece o seguinte erro no console:
Scene 'Game;' couldn't be loaded because it has not been added to the build settings or the AssetBundle has not been loaded. To add a scene to the build settings use the menu File->Build Settings... UnityEngine.SceneManagement.SceneManager:LoadScene (string) ControlaInterface:Reiniciar () (at Assets/Scripts/ControlaInterface.cs:40) UnityEngine.EventSystems.EventSystem:Update ()
segue o codigo:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class ControlaInterface : MonoBehaviour
{
private ControlaJogador scriptControlaJogador;
public Slider SliderVidaJogador;
public GameObject PainelGameOver;
// Start is called before the first frame update
void Start()
{
scriptControlaJogador = GameObject.FindWithTag(Tags.Jogador).GetComponent<ControlaJogador>();
SliderVidaJogador.maxValue = scriptControlaJogador.statusJogador.Vida;
AtualizarVidaJogador();
Time.timeScale = 1;
}
// Update is called once per frame
void Update()
{
}
public void AtualizarVidaJogador()
{
SliderVidaJogador.value = scriptControlaJogador.statusJogador.Vida;
}
public void GameOver()
{
PainelGameOver.SetActive(true);
Time.timeScale = 0;
}
public void Reiniciar()
{
SceneManager.LoadScene(Tags.Game);
}
}