test streamingassets

master
Yoshifumi Kawai 2020-04-15 15:23:23 +09:00
parent 6e441a2d14
commit 4ef15f3a14
4 changed files with 21 additions and 12 deletions

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Threading; using System.Threading;
using UniRx.Async; using UniRx.Async;
using UnityEngine; using UnityEngine;
@ -15,19 +16,11 @@ public class SandboxMain : MonoBehaviour
async void Start() async void Start()
{ {
await UniTask.CompletedTask; // ok UnityEngine.Debug.Log("DOWNLOAD START:" + Time.frameCount);
// var subject = new Subject<Unit>(); var req = await UnityWebRequest.Get(Path.Combine(Application.streamingAssetsPath, "test.txt")).SendWebRequest();
//subject.OnCompleted();
IObservable<AsyncUnit> subject = default; UnityEngine.Debug.Log("DOWNLOAD RESULT:" + Time.frameCount + ", " + req.downloadHandler.text);
try
{
await subject.ToUniTask(); // exception
}
catch (Exception exception)
{
Debug.Log(exception);
}
} }
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7bb6ff9f1f0d0cd4da5ba7623f10dd6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1 @@
MyTEST

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7fc83f79aef22a2449d5e9ca4964b2e0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: