
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
안녕하세요. 싱글톤화 마치고 르탄이가 비에 맞는 걸 구현하는 중이었는데요.
비가 내리지 않습니다..
비슷한 질문이 있나 찾아봤는데 대소문자가 다르면 안 된다고 해서 그것도 모두 수정했습니다.
수업 초반엔 gameManager 이라고 써왔었는데 1주차 6강에서 선생님께서 스크립트에 GameManager 로 쓰자고 하셔서
바꿨었습니다. 즉, 유니티에는 gameManager, 스크립트에는 GameManager 로 되어 있던 걸 모두 대문자 G 로 바꾸었어요.
그런데도 비가 내리지 않는데 제가 뭔갈 잘못하고 있을까요?



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
public GameObject rain;
public static GameManager I;
int totalScore;
void Awake()
{
I = this;
}
// Start is called before the first frame update
void Start()
{
InvokeRepeating("makeRain", 0, 0.5f);
}
// Update is called once per frame
void Update()
{
}
void makeRain()
{
Instantiate(rain);
}
public void addScore(int score)
{
totalScore += score;
}
