Building for Mono works, switching to IL2CPP and I get this:
Error: il2cpp.InvalidCommandLineArgumentsException: One or more assemblies must be specified using either --directory or --assembly
at il2cpp.Conversion.ContextDataFactory.CreateConversionDataFromOptions(Il2CppCommandLineArguments il2CppCommandLineArguments)
at il2cpp.Conversion.ConversionDriver.Run(Il2CppCommandLineArguments il2CppCommandLineArguments)
at il2cpp.Program.DoRun(String[ ] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)```
Does anyone know what's going on?
This is rather odd. It looks like the Unity Editor is telling IL2CPP to convert some assemblies to C++ code, but there are no assemblies provided on the command line.
This is not something I’ve seen before, did this project build with IL2CPP on a previous Unity verison?
Thank you for your answer. I’ve been able to solve this problem by… (drumroll) Installing IL2CPP. For some weird reason, it was not installed but still was offered as an option in the Player Settings.
Ok, so this happened. Earlier this afternoon I went into the Unity Hub, went to “Installs” and saw IL2CPP was not installed. So I installed IL2CPP, loaded my project again and low and behold, I was able to build my project using IL2CPP. All during the day I encountered no problems and was able to build with IL2CPP.
Then my PC crashed during a build.
I rebooted my PC and when I loaded my Project, it was corrupted. I got tons of error message it could not load GameObjects, or that it found Game Objects without reference, etc. etc. The loaded scene was completely f****** up.
So I restored the project from yesterday’s backup (only the project folder, nothing else). Loaded up the project and everything was fine. But when I tried to build for IL2CPP, I got the same error message as above again. IL2CPP is still installed (according to Unity Hub).
This is so terribly frustrating. I finally had IL2CPP working, now I’m back to square one again…
So to reiterate:
I was unable to build my project using IL2CPP because of above mentioned error
I check the installed modules and saw that “Linux Build Support (IL2CPP)” was not installed - even though the IL2CPP linker was available (otherwise I could not get the aforementioned linker error)
I install “Linux Build Support (IL2CPP)” and building my project using IL2CPP worked (hurray!)
My system crashes in the middle of a build. When I restart my PC and load my project, it’s corrupt (beyond repair).
I restore from last night’s backup but now building my project using IL2CPP gives me the same error as before, even though it (IL2CPP) is now marked as “Installed”
Yes I am. I think I found the culprit.Under “Player Settings” → “Other Settings” → “Graphic APIs”, I had both Vulcan and OpenGLES3 listed.After removing Vulcan, I was able to build without errors.
This is driving me insane… The error is back. I made a change in the “Managed Stripping Level” setting. Changed it from “Low” to “Minimal”. That gave me an error (which apparently was a known problem with a plug-in I’m using) so I change it back to “Low” again and now I’m getting the original error again.
So apparently, the error is not related to one specific thing but just pops up whenever it feels like it.
For me, it definitely had something to do with the Graphics API settting (in the Player settings). I enabled “Auto Graphics API”, immediately disabled it (and I think I also removed “Vulkan” at that time) and the error went away and never came back…
/Applications/Unity/Hub/Editor/2022.2.3f1/Unity.app/Contents/il2cpp/build/deploy/il2cpp --convert-to-cpp --generatedcppdir=/Users/briced/_PROJETS/RailShooter/Library/Bee/artifacts/iOS/il2cppOutput/cpp --enable-analytics --emit-null-checks --enable-array-bounds-check --dotnetprofile=unityaot-macos --profiler-report --profiler-output-file=/Users/briced/_PROJETS/RailShooter/Library/Bee/artifacts/il2cpp_conv_8vp6.traceevents --print-command-line --external-lib-il2-cpp=/Libraries/libil2cpp.a --data-folder=/Users/briced/_PROJETS/RailShooter/Library/Bee/artifacts/iOS/il2cppOutput/data
Error: il2cpp.InvalidCommandLineArgumentsException: One or more assemblies must be specified using either --directory or --assembly
at il2cpp.Conversion.ContextDataFactory.CreateConversionDataFromOptions(Il2CppCommandLineArguments il2CppCommandLineArguments) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Conversion/ContextDataFactory.cs:line 22
at il2cpp.Conversion.ConversionDriver.Run(TinyProfiler2 tinyProfiler, Il2CppCommandLineArguments il2CppCommandLineArguments) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Conversion/ConversionDriver.cs:line 18
at il2cpp.Program.DoRun(TinyProfiler2 tinyProfiler, String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 243
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)