Quantcast
Viewing all articles
Browse latest Browse all 387

How to replace WWW() with UnityWebRequest

I'm a complete beginner in this area, may someone help me? I currently have: string s; ... StartCoroutine(OutputRoutine(new System.Uri(paths[0]).AbsoluteUri)); ... private IEnumerator OutputRoutine (string url){ var output = new WWW(url); yield return output; s = output.text; } But that gives me a warning: *warning CS0618: `UnityEngine.WWW' is obsolete: `Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features'* How I can do what the warning says without changing the way it currently works? I don't want to change anything, just update the code to be more efficient and stop giving me warnings Additional context, if needed: this code is from an example from [SFB][1], which I'm using to save/load text files. [1]: https://github.com/gkngkc/UnityStandaloneFileBrowser

Viewing all articles
Browse latest Browse all 387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>