I am not sure if the code below is right, because I got an error message on Console:
Assets/Scripts/DiceManager.cs(15,35):error cs0029: Cannot implicitly convert type ‘void’ to ‘UnityEngine.UI.Button’
The code of DiceManager is as follows:
"using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DiceManager : MonoBehaviour {
public Button startOver;
public Button continueGame;
// Use this for initialization
void Start () {
startOver.gameObject.SetActive(false);
continueGame = gameObject.SetActive(false);
}
// Update is called once per frame
void Update () {
}
}
"
Your input would be much appreciated.
Thank you.