반응형
Notice
Recent Posts
Recent Comments
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

Do Something IT

[unity3d] www url 파일 로드 처리 값 받아오기 본문

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:

  1. bool isDone = false;
  2. void IEnumerator Start() {
  3. WWW myW = new WWW( url );
  4. yield return myW;
  5. isDone = true;
  6. }

Or using the isDone and progress properties:

  1. float progress = 0.0f;
  2. void IEnumerator Start() {
  3. WWW myW = new WWW( url );
  4. while( !myW.isDone )
  5. {
  6. progress = myW.progress;
  7. yield return null;
  8. }
  9. progress = 1.0f;
  10. }
more ▼

answered Jan 12 '12 at 10:29 AM

Kryptos gravatar image

Kryptos 
7.1k  5  30

반응형
Comments