servicetitan/lazy-proxy

PlatformNotSupportedException [Unity built on Android]

Xeoneid opened this issue · 2 comments

It works fine when it's executed on the Unity Editor but when the app was built and tested on a Moto G5 phone (Android Oreo 8.1) it crashes with a PlatformNotSupportedException

Partial stack trace (don't including project specific classes and method)

System.Reflection.Emit.AssemblyBuilder.DefineDynamicAssembly (System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access) (at <00000000000000000000000000000000>:0)
LazyProxy.LazyProxyBuilder..cctor () (at <00000000000000000000000000000000>:0)

I tried on other devices such as a Moto E6 Plus (Android Pie 9) and the issue persist

Hi @Xeoneid

Could you please provide an example of how do you use it?

Hi! I'm sorry I couldn't reply earlier, I was really busy.

I was using it on a custom dependency injection class where I pass interfaces of services. It worked fine on the Unity Editor (Mac and Windows as far as I tried), but on Android it failed.

It may have to do with a transpilation issue from Unity