커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4-3
undefined주차
북마크
김*준
댓글
3
추천
0
조회수
13
조회수
13
답변 완료

Assets\Scripts\gameManager.cs(7,12): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)

  • 시간을 흐르게 하기 위한 코드를 짰는데, 이러한 오류가 생성됩니다.



작성 코드)

using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class gameManager : MonoBehaviour

{

  public Text timeTxt;

  float time = 0.0f;

  // Start is called before the first frame update

  void Start()

  {

     

  }


  // Update is called once per frame

  void Update()

  {

    time += Time.deltaTime;

    timeTxt.text = time.ToString("N2");

  }

}


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