Beispiel #1
0
        private static IEnumerator LoadFile_Async(LoaderRequest rRequest)
        {
            WWW www = WWWAssist.Load(rRequest.Url);

            yield return(www);

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

            WWWAssist.Destroy(ref www);
        }
        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);
        }