- Home /
Feature 'async function' is not available in C# 4
Hello , Today I was trying to use async on unity
async void DataController()
{
}
it throws this error Feature 'async function' is not available in C# 4. Please use language version 5 or greater.
is there a way around it or I am doing something wrong
The 2017 beta version if i am not mistaken should support it, but it is a beta.
Answer by hitoruna · Oct 10, 2017 at 05:34 AM
Wait.. what??? I am running a program that uses a lot of Asyncs and Awaits and it runs fine.... (granted, it is not code I wrote, but I am planning of writing some myself... it does not run Async???)
yeah as far I know it doesn't, however, I guess it should change in latest version of Unity as far I know that it will have an experimental higher c# version correct me if am wrong ?
Answer by ShadyProductions · Jun 11, 2017 at 01:09 PM
Unity uses an older version of c# 3.0 and extra useful functions of c# 4 I believe. Look into this instead: https://docs.unity3d.com/ScriptReference/AsyncOperation.html
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
LoadSceneAsync additive and moving scene root problem 1 Answer
Unity Threading Issue: Not able to delegate task 0 Answers
Flip over an object (smooth transition) 3 Answers