
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
1-7강 동영상 16:00 지점부터 선생님 화면과 제 화면이 다릅니다.
일단 'no function'을 눌러서 나온 리스트 중 선생님이 말씀하시는 'panel'이 없습니다.
(그리고 하필 그 부분이 딱 선생님 얼굴캠으로 가려져 있어서, 패널 리스트 맞는지 확신도 없긴 해요..)
그리고 button 등 다른 리스트를 눌러봐도 retry()는 어디에도 없습니다.
그 직전까지는 영상을 여러번 돌려보며 똑같이 따라했다고 생각합니다만..
retry()가 왜 안 보이는 걸까요?

작성한 코드 및 에러 메세지
아래는 panel.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void retry()
{
gameManager.I.retry();
}
}
아래는 gameManager.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class gameManager : MonoBehaviour
{
public GameObject rain;
public GameObject Panel;
public static gameManager I;
public Text scoreText;
public Text timeText;
int totalScore;
float limit = 5f;
void Awake()
{
I = this;
}
// Start is called before the first frame update
void Start()
{
InvokeRepeating("makeRain", 0, 0.5f);
}
void makeRain()
{
Instantiate(rain);
}
// Update is called once per frame
void Update()
{
limit -= Time.deltaTime;
if (limit < 0)
{
Time.timeScale = 0.0f;
Panel.SetActive(true);
limit = 0.0f;
}
timeText.text = limit.ToString("N2");
}
public void addScore(int score)
{
totalScore += score;
scoreText.text = totalScore.ToString();
}
public void retry()
{
SceneManager.LoadScene("MainScene");
}
}
빨간 줄로 표시된 부분은 없습니다;ㅂ;
