Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.3.0a1
2018.1.0a1
2018.1.0f2
2018.2.0a1
2018.3.0a1
2019.1.0a1
Issue ID
1075746
Regression
No
[General] Inconsistent calls to [InitializeOnLoadMethod] in a DLL
How to reproduce:
1. Open the user-submitted project(Startup Delay Call Bug)
2. Check the Console window
3. Export NewBehaviourScript.cs and Test.dll into a package
4. Delete the NewBehaviourScript.cs and Test.dll from the Assets folder
5. Import the package, exported in step 5
6. Check the Console window
Expected result: in all cases, there are only 4 messages logged into the Console window
Actual result: in step 2, there are multiple messages logged from the DLL when there should only be 2. In step 6 there is one extra Initialization message from the DLL logged
Reproducible with: 2017.4.14f1, 2018.1.9f2, 2018.2.16f1, 2018.3.0b10, 2019.1.0a9
Notes:
The behavior of this issue has changed in 2018.2.12f1, 2018.3.0b5 and 2019.1.0a3 - upon launching the project the messages are only logged once(4 messages) and not twice (8 messages)
Making more serious changes to the 'Library' folder(such as deleting it and letting it be re-generated upon launching the project) or opening the project with a different version of Unity logs multiple messages from the DLL file. Opening the project in the same version as it was opened previously seems to work as expected.
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
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
Resolution Note:
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.