예를 들어
IEnumerator testFunc = null;
testFunc = TestFunc;
StartCoroutine(testFunc);
public IEnumerator TestFunc()
{
함수내용
while(true)
{
if(testFunc != null)
{
stopCoroutine(testFunc)
testFunc = null;
gameobject = null;
break;
}
}
}
현재 진행중인 프로젝트에서 이런식으로 구현되있는데 이렇게 사용해도 되는건가요? 코루틴 내부에서 자기 자신을 스탑하는게 yield break가 아닌 저방식으로 가능한건가요?