인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

sojae03067014's profile image
sojae03067014

asked

Unity Game Development (2D) Practical - From Scripts to Design Patterns and Algorithms

Coroutine #1

소스코드에서 에러가 발생합니다

Written on

·

2.7K

0

'''
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Coroutine : MonoBehaviour {

void Start()
{
    StartCoroutine(Waiting());
}
IEnumerable Waiting()
{
    yield return new WaitForSeconds(3f);
    Debug.Log("Good !");
}

}
'''
해당 코드에서

심각도 코드 설명 프로젝트 파일 줄 비표시 오류(Suppression) 상태

오류 CS1503 1 인수: 'System.Collections.IEnumerable'에서 'string'(으)로 변환할 수 없습니다. Assembly-CSharp D:Unity ProjectsKoroutineAssetsCoroutine.cs 9 활성

이 에러가 발생합니다 왜 발생하는지 이유를 알수 있을까요?

unity디자인-패턴

Answer 4

0

빙고~ able 이 아닌 rator 로~

0

빙고~ able 이 아닌 rator 로~

0

빙고~ able 이 아닌 rator 로~

0

IEnumerable이 아닌 IEnumerator로 바꿔서 사용해보시면 되실겁니다.

sojae03067014's profile image
sojae03067014

asked

Ask a question