커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
rain을 인식하지 못하는 거 같습니다...
게임 개발이 처음이어도 쉽게 배우는 모바일 게임 개발 v0
1주차
북마크
조*신
댓글
3
추천
0
조회수
17
조회수
17
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


오류가 나는데 문제를 못 찾겠어서 질문남겼습니다.



스파르타 즉문즉답

using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class GameManager : MonoBehaviour

{

  public GameObject rain;

  // Start is called before the first frame update

  void Start()

  {

    InvokeRepeating("MakeRain", 0f, 1f);

    MakeRain();


  }


  // Update is called once per frame

  void Update()

  {

     

  }


  void MakeRain()

  {

    Instantiate(rain);

  }

}




작성한 코드 및 에러 메세지

UnassignedReferenceException: The variable rain of GameManager has not been assigned.

You probably need to assign the rain variable of the GameManager script in the inspector.


UnassignedReferenceException: The variable rain of GameManager has not been assigned.

You probably need to assign the rain variable of the GameManager script in the inspector.

UnityEngine.Object.Instantiate[T] (T original) (at <e97d84204f8d4aef92b538c5bab948f1>:0)

GameManager.MakeRain () (at Assets/Scripts/GameManager.cs:24)






취소
 공유
취소
댓글 0
댓글 알림
나의얼굴