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
- Spots of bad lighting appear on assets when the lighting is generated in a Scene
- Static Editor Flags dropdown list is cut off when Inspector Window is docked to the very right and UI Scaling is set to a higher value
- visionOS Players are minimized when Guided Access is turned on
- Licensing Client fails to launch when opening Unity Hub
- Sprite Atlas Inspector preview disappears when entering Play mode unless SpriteAtlasMode is set to "Sprite Atlas V2 - Enabled"
Resolution Note (fix version 2022.2.1f1):
Player: Fixed RuntimeInitializeOnLoad not working when used in precompiled assemblies in packages