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
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
- User is redirected to a non-existing online documentation link when clicking on "?" help button inside Inspector window while Animator Override Controller is selected
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.