- Home /
Why does scripting backend slow down android app?
I am trying to make an Android app in Unity that uses some heavy computation, when I tried to publish it to the google developer console I got an error "This release is not compliant with the Google Play 64-bit requirement" After some digging around I found that I need to change the Scripting Backend to IL2CPP Instead of Mono and un-select x86 Now Google lets me publish the app, but when I build and run it on my phone it is significantly slower, should I be worried about this? If so is there any way to fix this? (when I change Scripting Backend back to Mono and build and run the app doesn't lag any more when it's running, perhaps there are some different settings that I need to use?) What I read so far was that the Scripting Backend IL2CPP is supposed to be faster as far as when the app is run, but at least on my phone this doesn't seem to be the case The phone I'm using to test this is a ZTE Blade, Model number Z965 (I think it's called ZTE Blade X but I'm not sure)in case that's useful
can you attach a png of both consoles (il2cpp and mono) using the development build? to see whats slowing you down
Answer by naviln · Nov 05, 2019 at 12:50 AM
IL2CPP is slower to compile, but results in more optimized code. I have had issues with stripping in the past - i.e. the compiler removing classes from my managed assemblies, because they were instantiated via reflection. Do you use any managed assemblies in your code? You may have to explicitly link those classes using a link.xml file. https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html
I guess you could try setting your managed stripping level to disabled (as per your screenshot (where its currently set to low)? You could potentially try without stripping the engine code too? (the option just above it)
There are also a few performance related compiler options that may be worth investigating for your project: https://docs.unity3d.com/Manual/IL2CPP-CompilerOptions.html
Do you have the option to try a download a different version of Unity? (A more recent version). To see if that makes a difference
Your answer
Follow this Question
Related Questions
Unity UI Capability 0 Answers
Physics architecture. When first step after collision happens? 0 Answers
Light bake artifacts 19.3 0 Answers
Object acceleration 2 Answers