Search Issue Tracker
Active
Votes
0
Found in
2022.3.51f1
6000.0.24f1
6000.1.0a1
Issue ID
UUM-85476
Regression
No
[IL2CPP] RuntimeInitializeOnLoadMethod is stripped/not executed for Android development builds
Steps to reproduce:
1. Open the attached user's project "TestAssemblyStripping.zip"
2. Switch to Android
3. Make sure Development build is enabled
4. Built to android devices
5. Open Android logcat and observe only the "BadBoy Start()" messaged is logged
Expected results: [RuntimeInitializeOnLoadMethod] is executed in Android Development builds
Actual results: [RuntimeInitializeOnLoadMethod] output is stripped/not executed in Android Development builds
Reproducible with: 2022.3.51f1, 6000.0.24f1, 6000.1.0a1
Not reproducible with: 2021.3.45f1
Could not test below 2022.2.0b1 and locate FAV due to gradle build failures
Reproducible with these devices:
VLNQA00381, Xiaomi Redmi Note 8 Pro (Redmi Note 8 Pro), Android 9, CPU: MediaTek Helios G90T MT6785T, GPU: Mali-G76 MC4
VLNQA00528, Hmd Global Nokia G20 (Nokia G20), Android 13, CPU: Mediatek MT6765G Helio G35 (12 nm), GPU: PowerVR Rogue GE8320
VLNQA00422, Samsung Galaxy S21 Ultra 5G (SM-G998B), Android 11, CPU: Exynos 2100, GPU: Mali-G78
VLNQA00282, Samsung Galaxy S10e (SM-G970U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
S21+ (user)
Testing Environment: Windows 11 23H2
Not reproducible on: no other environment tested
Notes:
-The assembly definition has a constraint (UNITY_EDITOR || DEVELOPMENT_BUILD), but the method is still stripped in development builds
-[Preserve] and [AlwaysLinkAssembly] attributes do not prevent stripping
-The method runs as expected when placed in a MonoBehaviour, but not with the runtime initialization attribute
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono release JIT incorrectly replaces long multiplication with a left-shift operation
- [IL2CPP] RuntimeInitializeOnLoadMethod is stripped/not executed for Android development builds
- Animation fails to trigger when Animator enters Animation State and Animator Component is on the parent GameObject
- "NullReferenceException" is logged when adding a visual element to a list using the Item Template setting
- Errors are thrown and the view is not rendered properly when using Overlay Camera with Non-Default 2D Renderer
Add comment