Search Issue Tracker
Fixed
Fixed in 2022.2.1f1, 2023.1.0a17
Votes
0
Found in
2022.2.0b8
2023.1.0a11
Issue ID
UUM-14487
Regression
Yes
"InitializeOnLoad" is not called in build when relocating and reinstalling a package
How to reproduce:
1. Open the attached project “InitLoadProject.zip“
2. Open the Package Manager (Window > Package Manager)
3. Remove the “RuntimeOnLoad“ package
4. Import the user package by tarball:
4.1 Press the plus at the top left of the Package Manager
4.2 Select “Add package from tarball…“
4.3 Select the “com.test.runtimeonload.tgz“ package from the Assets folder
5. Open the Build settings of the project (File > Build Settings…)
6. Select Development Build
7. Build And Run the project
8. Open the Player Logs (~/Library/Logs/Default Company/tarball-repro/Player.log)
Reproduction steps to immediately see the issue:
1. Open the “InitBuild“ Build in the attached project “InitLoadProject.zip“
2. Open the Player Logs (~/Library/Logs/Default Company/tarball-repro/Player.log)
Expected result: "RuntimeOnLoadDll.RuntimeOnLoad.InitializeDll is called in BeforeSceneLoad from RuntimeOnLoadDll\!" message in the Player Log
Actual result: There is no "RuntimeOnLoadDll.RuntimeOnLoad.InitializeDll is called in BeforeSceneLoad from RuntimeOnLoadDll\!" message in the Player Log
Reproducible with: 2022.2.0a1, 2022.2.0b8, 2023.1.0a11
Not reproducible with: 2020.3.39f1, 2021.3.10f1, 2022.1.16f1
Reproduced on: macOS (12.5)
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
- [Quest 2] Surface shader and multi-view sampling custom textures broken in Quest 2
- Lighting Data asset is not created when baking multiple Scenes at the same time
- Performance issues when instantiating a recognizer under UnityEngine.Windows.Speech
- Build fails with "Exception: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 0 failed ones" when building the project for iOS
- [Android] .aab Build fails when using Asset Bundles
Resolution Note (fix version 2022.2.1f1):
Player: Fixed RuntimeInitializeOnLoad not working when used in precompiled assemblies in packages