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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
Resolution Note (fix version 2022.2.1f1):
Player: Fixed RuntimeInitializeOnLoad not working when used in precompiled assemblies in packages