Exemple #1
0
        public static IEnumerator LoadFile(LoaderRequest rRequest)
        {
            WWW www = WWWAssist.Load(rRequest.Url);

            yield return(www);

            rRequest.Text  = www.text;
            rRequest.Bytes = www.bytes;

            rRequest.SetResult(rRequest);

            WWWAssist.Destroy(ref www);
        }
Exemple #2
0
        public async static Task <LoaderRequest> LoadFile(string rURL)
        {
            LoaderRequest rRequest = new LoaderRequest(rURL);

            WWW   www = WWWAssist.Load(rRequest.Url);
            await www;

            rRequest.Text  = www.text;
            rRequest.Bytes = www.bytes;
            WWWAssist.Destroy(ref www);

            return(rRequest);
        }