Closed james7132 closed 6 years ago
Unity seems to support calling these Tasks only within normal Unity game loops. We are currently using this to handle asynchronous processes outside of the normal context of Unity threads, which is preventing a UnitySynchronizationContext from being injected and causing Unity APIs to be called from non-main threads.
This issue is to be put on hold until a better solution for working with the new .NET 4.6 profile can be found. Currently builds fail or timeout on Unity Cloud Build with the setting enabled.
Done with reimplementation.
This is one of the changes after switching to .NET 4.6: async language support. This will allow us to stop maintaining our async promise library of our own.
This is currently blocked by the fact that Unity currently does not have a SynchronizationContext for forcing code to run on the Unity main thread, which causes async tasks to default to being run on the Mono threadpool. This can easily cause issues with tasks calling Unity APIs from a thread other than the main thread.