검색결과 리스트
된장 에 해당되는 글 1건
- 2015.04.07 Unity에서 다른 클래스의 코루틴 호출하기
2015.04.07 17:49
패치 모듈 만들다가 패치 모듈의 코루틴을 써야되는 상황일 때..
StartCoroutine은 non-static member function입니다.
결론만 간단히 ...
아래와 같이 활용하세요.
// 활용 코드
Test test = GameObject.Find("TestPrefab").GetComponent<Test>();
yield return test.StartCoroutine( test.startPatch());
(in Test.cs)
// 샘플 Test class 선언 형태
public class Test : MonoBehaviour
{
public IEmumerator startPatch(){
.
.
.
}
}
* TestPrefab을 만들어서 Test script 연결해 해당 씬에 등록하세요.
'개발/경험 > Unity' 카테고리의 다른 글
Google Analytics 연동하기 - 2. API 살펴보기 (0) | 2015.07.07 |
---|---|
Google Analytics 연동하기 - 1. 초기 설정 (0) | 2015.07.06 |
Unity에서 다른 클래스의 코루틴 호출하기 (0) | 2015.04.07 |
Unity 원격 디버깅 (0) | 2015.04.02 |
Unity5.0 에서의 AssetBundle 변경 사항 요약 (0) | 2015.03.25 |
Asset Bundle 작업 흐름의 강화 - Unity Manual/Architecture/Architecture HOWTOs/AssetBundles (0) | 2015.03.20 |