-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity: Error when building with IL2CPP #878
Comments
Hi @Cherden Yes those are packed by default, and specific to some projects. Try the subset of dlls in netStandardMinimalUnityAOT.zip |
Thank you for your fast reply @juanfranblanco.
|
Web3Lite is when you don't need to use any signing libraries, as it does not force you to include the Account project. If not use Nethereum.Web3. |
Added the dlls from netStandardUnityCommonAOT.zip (I think that's the one your were talking about, right?) and:
I'm also getting this warning: |
hmm you dont seem to be targetting netstandard, .netx would expect that. I have updated the packages to include the metamask js file, that solves:
|
Yes, I'm targeting .Net 4.x. I am using the dlls from net472dllsAOT.zip now (as it seems I need those for my target version). There I get the error that System.Reactive.dll requires WindowsBase when starting the build process. |
i have not packaged those yet, dont include "Nethereum.RPC.Reactive.dll" as i assume you wont be using that, that will solve your dependency to system reactive. |
Removing "Nethereum.RPC.Reactive.dll" started the il2cpp build process, but gave the linking error:
Do I need to do something with the NethereumMetamask.jslib that you added in the other release? |
yes, you are missing this file https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Unity/NethereumMetamask.jslib |
After adding NethereumMetamask.jslib the linking error reads:
|
?? that should not happen you are using 4.8.0 no? |
Not 100% sure which one unity uses, but max. 4.7.1. |
Nethereum 4.8.0 I meant |
Oh, yes. Using these dlls: net472dllsAOT.zip with added link.xml and NethereumMetamask.jslib, and removed the Nethereum.RPC.Reactive.dll. |
@Cherden I have released now the 470 dlls also updated the starter demo https://github.com/Nethereum/Unity3dSampleTemplate/blob/master/README.md hopefully this can help you |
I also faced the same issue, so to test I cloned https://github.com/Nethereum/Unity3dSampleTemplate.git this and opened in Unity changed the scripting backend to IL2CPP, same error coming when making a build
|
Have been trying with the net472UnityCommonAOT.zip dlls and was missing System.Memory.dll, System.Buffers.dll and System.Runtime.CompilerServices.Unsafe.dll (unresolved dependency errors) which I added from net472dllsAOT.zip. Additionally I have still the link.xml included mentioned above. Getting the link error:
|
@Cherden i have not had any issues ith those dlls. Regarding the issues external symbols I am going to move the MM part to another library so it can be excluded when the target is not webgl. |
Ok I have separated now the MM from the core Unity component. ?The issue was that the jslib was not inluded in other platforms, so in this scenario is much better to isolate both components for that platform only. Release here: |
Works now 🎉 . Thank you very much for your support @juanfranblanco. |
Thanks to you too :) |
I have a project that builds .NET4.X AOT with IL2CPP. I used the DLLs of net472dllsAOT.zip from release 4.8.0, which in itself do not show errors. Once I start to compiler, an error is shown reading
ArgumentException: The Assembly WindowsBase is referenced by System.Reactive ('Assets/CoaBlockchainSDK/Plugins/Nethereum/System.Reactive.dll'). But the dll is not allowed to be included or could not be found.
. When adding the WindowsBase.dll from my system to the project (as described here), compiling works but the app does not start due to some other errors (most likely because it is not on Windows).Building with mono works fine.
I have tried previous releases, with net461dlls.zip, as well as netStandard but none of them seem to work.
Was anyone able to build with IL2CPP or is it even supported?
The text was updated successfully, but these errors were encountered: