Questions tagged [il2cpp]

For issues relating to the IL2CPP Unity scripting back-end.

IL2CPP is a Unity-developed scripting back-end which can be used as an alternative to Mono when building projects for some platforms. Therefore Unity converts IL code from scripts and assemblies into C++ code, before creating a native binary file (.exe, apk, .xap, for example) for a chosen platform.

153 questions
3
votes
1 answer

How to solve AOT and code stripping on Unity3D iOS builds

What should you do when the IL2CPP compiler starts striping your code from your external assemblies (dll) in you iOS builds. Causing your JSON De/serialization code to break.
UberGeoff
  • 192
  • 6
3
votes
0 answers

Unity 5.1.2 - previously could, but now unable to build to iOS

I am creating a game using Unity 5.1.2. Till last week I was able to build to iOS. But now suddenly, am getting lot of il2cpp related errors due to which I cannot build anymore. Have tried opening old builds, installed Unity 5.1.2 p1.....but the…
user2442902
  • 83
  • 1
  • 8
3
votes
1 answer

how to prevent stripping of managed dlls in Unity3d IL2CPP

I am using System.Text.Encoding's 1252 encoding for extended ASCII support to fully utilized the 8th bit of a byte, so far when using Mono as the Scripting Backend, I'll be able to prevent the stripping of the code through Assets/link.xml file like…
Zennichimaro
  • 5,236
  • 6
  • 54
  • 78
2
votes
0 answers

IL2CPP Build error for android (Unity 2022.2.1f1)

I had to change Mono to IL2CPP so that I can use the ARM64 to publish my game on Google Play. But every time I build I get those errors. This is what the error looks like: Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with…
sozenka
  • 21
  • 1
2
votes
1 answer

DependencyInjection throw error when compiling with IL2CPP in unity for linux server

I am using the following code in a Utils script and calling this variable each time I want to create a HttpClient: public static IHttpClientFactory httpClientFactory = new…
2
votes
1 answer

IL2CPP vs Mono scripting. How to find what breaks IL2CPP script?

I am new to Unity development, so this is totally unexpected behavior for me that I have no idea how to deal with. My application runs perfectly on Android 10 device when complied using mono. However compilation with IL2CPP breaks some part of the…
PKey
  • 3,715
  • 1
  • 14
  • 39
2
votes
1 answer

DataContractSerializer fails for List on Android when compiled using Unity3d's IL2CPP with "no ahead of time (AOT) code was generated" error

I have changed my serialization to DataContracts but now I am having problem with a specific class. It works fine on my Mac, but not on my android devices when built using IL2CPP. The thread stops at the writeObject function. My three classes…
2
votes
1 answer

C# System.Type.GetType(string) returns nested class instead of the global class

I have the following code structure as example: public class Character { public enum MovementType { } } public class CombatMode { public class FinalFight { public class Character { } } } The problem is…
deck
  • 343
  • 2
  • 11
2
votes
1 answer

Unity Building Linux Il2CPP player requires a sysroot toolchain package to be installed

For some reason I'm unable to build an IL2CPP Linux build in unity. I used to be able to build IL2CPP Linux builds fine on the same machine using the same version of unity, but it recently stopped working. This problem occurs in a new project, so I…
RedmiS22018
  • 75
  • 1
  • 6
2
votes
1 answer

Error occurred when 'il2cpp Android build' in Unity

error : Exception: Failed running D:\UnityEditor\2021.1.9f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @D:/UnityProject/ProjectName/Temp/StagingArea/assets/bin/Data/Managed/response.rsp stdout: Fatal error in…
Ban
  • 35
  • 2
  • 7
2
votes
2 answers

How do I convert a std::string to System.String in C++ with Il2CppInspector?

I am using Il2CppInspector to generate scaffolding for a Unity game. I am able to convert System.String (app::String in Il2CppInspector) to std::string using the functions provided below. How would I reverse this process; how do I convert a…
UnAlpha
  • 127
  • 14
2
votes
0 answers

IL2CPP: C++ compiler config "Release" makes app freeze

I am facing severe problems with building my app "VolarPro" using IL2CPP. My test setup: Unity: 2020.3.3f1 Device: Samsung Galaxy Tab S3 Tablet Android Version: 9 Details: I have developed a simulation game targeting Android OS. The game logic is on…
ralku
  • 21
  • 1
2
votes
1 answer

Can I use IL2CPP (Intermediate Language To C++) for non-Unity applications?

IL2CPP.exe is a Unity utility for converting C# IL code to C++. My question is: can this executable be used outside of the Unity game-development environment as a general-purpose tool for converting any .NET application (not just games) to a…
Cade Bryant
  • 737
  • 2
  • 7
  • 19
2
votes
0 answers

Unity 2019.3 : "Crash On Android Phone"

I have built AAB (for ARM & ARM-64) then test it to my Android Smartphone, but I found it crash. By Inspecting the log I found below error (using HTC U11, API Level 26): Build fingerprint:…
questionasker
  • 2,536
  • 12
  • 55
  • 119
2
votes
1 answer

Unity3D: Cannot change scripting backend to .NET

Currently, the scripting backend is IL2CPP. I need to change it to .NET. I am not sure why it is disabled. I tried to add component via Unity Hub. It doesn't have Add component option and there was no option in Unity Installer as well. How do I…
MrRobot9
  • 2,402
  • 4
  • 31
  • 68
1
2
3
10 11