Unity3D
[unity3d] www url 파일 로드 처리 값 받아오기
아낙시만더
2013. 4. 9. 18:57
반응형
출처 : 바로가기
Well. WWW class is a Coroutine so you can just yield it until it is completed.http://unity3d.com/support/documentation/ScriptReference/WWW.html
For example:
- bool isDone = false;
- void IEnumerator Start() {
- WWW myW = new WWW( url );
- yield return myW;
- isDone = true;
- }
Or using the isDone and progress properties:
- float progress = 0.0f;
- void IEnumerator Start() {
- WWW myW = new WWW( url );
- while( !myW.isDone )
- {
- progress = myW.progress;
- yield return null;
- }
- progress = 1.0f;
- }
반응형