I’m trying to do asynchronous web calls outside of the www class using httpwebrequest. At the end of my asynchronous web requests, I need to tell unity to do stuff with the data, but unity doesn’t like it because I’m calling from off the main thread. My intention was to create a TaskScheduler on the main thread, tell the web request about it, and have the web request schedule it’s tasks on the main thread when it completes. But intellisense doesn’t recognize System.Threading.Tasks (it does recognize System.Threading), and therefore I get compile errors if I try to create a TaskScheduler.
Open to solutions to instantiate a Task Scheduler, or alternatives for getting back to the main thread once I’m off it.
I just had to solve this. Now threading.Tasks are included in Unity 2017. Download the latest Unity, 2017, go to Edit/ Project Settings/ Player > scroll down and select to 'Configuration and set Run Time API as “Experimental (.Net 4.6 Equivalent).”