티스토리 뷰
string url = "http://nine99.tistory.com/xxx.xml";
이런식의 웹데이터도 읽어올 수 있다.
또한, ogg 같은 Sound Clip 도 읽어 올 수 있음.( mp3 나 wav 는 읽어올 수 없음, unity3D 에서 지원하지 않음)
using UnityEngine;
using System.Collections;
using System.Xml;
using System;
public class XXX : monoBehaviour {
string xmlString;
public IEnumerator WaitForXML()
{
yield return www;
xmlString = www.text;
print( xmlString );
}
public void TestFunction()
{
string url = "file://NoteData.xml";
www = new WWW( url );
StartCoroutine( WaitForXML() );
if ( www.error == null )
{
}
else
{
Debug.Log( "ERROR : " + www.error );
}
}
void OnGUI()
GUILayout.BeginArea( new Rect( 5, 25, 100, 400 ) );
//............................
if ( GUILayout.Button( "Test Button" ) )
{
TestFunction();
}
GUILayout.EndArea();
}
}
|
'Programming > Unity3D' 카테고리의 다른 글
yield 란 놈은... 참.. (0) | 2010.10.13 |
---|---|
C# Binary File Access (0) | 2010.10.11 |
댄스... (0) | 2010.09.20 |
Airplay 처음 접하고... (0) | 2010.08.27 |
Unity3D 에니메이션 구성성(Facial Ani 및 Eye Tracking에 관하여) (0) | 2010.08.04 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 수신기
- 하니비
- 유니티3D
- 2a3
- 스윙팡
- 유니티
- Unity3D
- 실바웰드
- 타석스크린
- hybrid
- EP200
- 웰케라
- rx-2404
- 6bq5
- iPhone
- ep-200
- transistor
- 250
- 앰프
- KT88
- gaui
- 시뮬전용
- KT-88
- TRex
- 송신기
- 프리앰프
- 하이브리드
- bias
- 타격연습기
- 진공관
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함