csharp-eval-unity3d
csharp-eval-unity3d copied to clipboard
Exception
Catched exception on the first call CSharpExpression.Evaluate
NotSupportedException: /Users/builduser/buildslave/unity/build/External/il2cpp/il2cpp/libil2cpp/icalls/mscorlib/System.Reflection.Emit/DynamicMethod.cpp(24) : Unsupported internal call for IL2CPP:DynamicMethod::destroy_dynamic_method - System.Reflection.Emit is not supported.
Hi @yanmasharski!
- On which platform?
- How is library embedded in Unity's build. Source or dll?
- Which version of c# eval is used?
- iOS
- DLL from AssetStore
- v2.2.1
destroy_dynamic_method
-it's looks like DynamicMethod's de-constructor. I use this code https://github.com/deniszykov/csharp-eval-unity3d/blob/c99130db7d69159cc94382b3e864bc62c74a099a/GameDevWare.Dynamic.Expressions/AotCompilation.cs#L41 to detect AOT runtime. It's create an instance of DynamicMethod via call to Expression<T>.Compile()
. And later this instance cause exception in Finalizer thread because DynamicMethod.Finalize()
is not implemented in IL2CPP runtime.
You actually can't catch this exception because it's raised in Finalizer thread and just logged.
Are you sure that you caught this exception or it's just appear in log?
p.s. i reported this bug to Unity long time ago.
I found this exception in the log. Thanks for you answer.