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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
Resolution Note (fix version 2022.2.1f1):
Player: Fixed RuntimeInitializeOnLoad not working when used in precompiled assemblies in packages