mirror of https://github.com/Cysharp/UniTask
test streamingassets
parent
6e441a2d14
commit
4ef15f3a14
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using UniRx.Async;
|
||||
using UnityEngine;
|
||||
|
@ -15,19 +16,11 @@ public class SandboxMain : MonoBehaviour
|
|||
|
||||
async void Start()
|
||||
{
|
||||
await UniTask.CompletedTask; // ok
|
||||
UnityEngine.Debug.Log("DOWNLOAD START:" + Time.frameCount);
|
||||
|
||||
// var subject = new Subject<Unit>();
|
||||
//subject.OnCompleted();
|
||||
IObservable<AsyncUnit> subject = default;
|
||||
try
|
||||
{
|
||||
await subject.ToUniTask(); // exception
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Debug.Log(exception);
|
||||
}
|
||||
var req = await UnityWebRequest.Get(Path.Combine(Application.streamingAssetsPath, "test.txt")).SendWebRequest();
|
||||
|
||||
UnityEngine.Debug.Log("DOWNLOAD RESULT:" + Time.frameCount + ", " + req.downloadHandler.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7bb6ff9f1f0d0cd4da5ba7623f10dd6b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1 @@
|
|||
MyTEST
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7fc83f79aef22a2449d5e9ca4964b2e0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue