knah / Il2CppAssemblyUnhollower

A tool to generate Managed->IL2CPP proxy assemblies
GNU Lesser General Public License v3.0
503 stars 87 forks source link

Async usage of Il2CppSystem.Threading.Tasks.Task<TResult>? Is it possible? #79

Closed IMB11 closed 1 year ago

IMB11 commented 2 years ago

Self explanatory, is it possible to in some way do await on an il2cpp async method?

Xgames123 commented 2 years ago

If you really want to use await I think it is possible to manually write a IAsyncStateMachine for your method that calls await On https://sharplab.io/ set right to release and write a dummy async method on the left to see what the compiler will generate