Unity3D/Unity 내용 & 공부
StreamingAsset Json읽기
아시타가
2022. 5. 19. 09:37
// unity 낮은버전
WWW read = new WWW(Application.streamingAssetsPath + "파일이름.json");
// unity 높은버전
void Start()
{
StartCoroutine(aa());
}
IEnumerator aa()
{
UnityWebRequest request = UnityWebRequest.Get(Application.streamingAssetsPath + "파일이름.json");
yield return request.SendWebRequest();
Debug.Log(request.downloadHandler.text);
}