
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
retry Button 생성하고 함수를 먹였는데 아예 먹지를 않아요. debug로 작동시켜봐도 클릭했을때 함수자체가 아예 동작을 하지 않네요. debug를
main scene load로 해도 작동이 안되는걸 봐선 onclick자체에서 오류가 생기는것 같네요.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class gameManager : MonoBehaviour
{
public GameObject Square ;
public GameObject endPannel;
public Text timeTxt;
public Text thisScoreTxt;
float alive = 0f;
public static gameManager I;
bool isRunnig = true;
void Awake()
{
I = this;
}
// Start is called before the first frame update
void Start()
{
Time.timeScale = 1.0f;
InvokeRepeating("makeSquare", 0.0f, 0.5f);
}
// Update is called once per frame
void Update()
{
if(isRunnig)
{
alive += Time.deltaTime;
timeTxt.text=alive.ToString("N2");
}
#pragma warning restore format
}
void makeSquare()
{
Instantiate(Square);
}
public void gameOver()
{
Time.timeScale=0f;
endPannel.SetActive(true);
thisScoreTxt.text=alive.ToString("N2");
}
public void retry()
{
Debug.Log("reload");
}
}
