- Home /
System.Threading.Tasks 1' does not exist in the namespace 'System.Threading.Tasks'
What's up guys?
First of all, sorry for my bad english, not a native speaker here.
I tried to use the .Net-Framework in connection with unity and found out, that including the Tasks.dll in unity showed the error message above. I wrote the code in Visual Studio and added the assembly reference for System.Threading.Tasks. After some research I found out, that I had to change the target to .Net 4 and added the Tasks.dll to the plugin folder of unity.
After that, I got stuck with the error message above. I already saw the posts: http://answers.unity3d.com/questions/1010382/how-to-use-systemthreadingtasks.html http://answers.unity3d.com/questions/904575/cant-include-systemthreadingtasks.html
but it either didn't help or I didn't fully understand.
So if anyone's up for some good ideas, it would help so much.
Answer by ericbegue · Jan 07, 2017 at 05:06 PM
Unity uses an old version of the Mono Runtime ( .Net 2.0). Asynchronous methods (async/await, System.Threading.Tasks) has been introduce since .Net 4.5, so this feature simply does not currently exists in Unity. Updating the Mono Runtime is nonetheless on the development roadmap, but without no shipping date.
You might be interested by the following thread, which is a discussion about updating to C# 6.0:
https://forum.unity3d.com/threads/c-6-0.314297/
AI Scripting - Panda BT: Behaviour Tree scripting for Unity.