Search Issue Tracker
Fixed in 6000.0.31f1
Fixed in 6000.1.0a6
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Polyspatial Material swap set animations are not firing when used in Play Mode and Players
- Incomplete shortcuts are displayed in the "Set" dropdown in Visual Effects Graph VFX Control subwindow
- Version change sub-window closes automatically when "Add Modules" subwindow is closed
- RenderTexture content from 'Depth Only' camera is not rendered correctly on UI RawImage when Multithreaded Rendering is enabled on specific MediaTek devices.
- Weight Brush Overlay text is clipped in Sprite Editor
Resolution Note (fix version 6000.0.31f1):
Fixed by another internal issue: UUM-84208: [RuntimeInitializeOnLoad] method not called in build when define constraints are used
Resolution Note (fix version 6000.1.0a6):
Fixed by another internal issue: UUM-84208: [RuntimeInitializeOnLoad] method not called in build when define constraints are used