modesttree / Unity3dAsyncAwaitUtil

A bunch of code to make using async-await easier in Unity3D
MIT License
454 stars 120 forks source link

this fails on il2cpp builds #15

Open extrawurst opened 5 years ago

extrawurst commented 5 years ago

this method in C#

private async void DelayedFakeChat()
{
  await new WaitForSeconds(1.0f);
  _signalBus.Fire(...);
}

fails to build in an il2cpp build:

Bulk_Assembly-CSharp_1.cpp:21899:9: assigning to 'RuntimeObject *' (aka 'Il2CppObject *') from incompatible type 'U3CDelayedFakeChatU3Ed__51_t8460B8A56468D8BC08EE7C35ACAE8A2C8ABDECBE'

any ideas? should it even work on il2cpp?

i am on unity 2018.4.2

chiuan commented 4 years ago

this method in C#

private async void DelayedFakeChat()
{
  await new WaitForSeconds(1.0f);
  _signalBus.Fire(...);
}

fails to build in an il2cpp build:

Bulk_Assembly-CSharp_1.cpp:21899:9: assigning to 'RuntimeObject *' (aka 'Il2CppObject *') from incompatible type 'U3CDelayedFakeChatU3Ed__51_t8460B8A56468D8BC08EE7C35ACAE8A2C8ABDECBE'

any ideas? should it even work on il2cpp?

i am on unity 2018.4.2

i build this project success on android il2cpp : 2019.2.3f1