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
- Crash on "The GUID inside 'Assets/asset.png.meta' cannot be extracted by the YAML Parser." when opening the project
- Shadows disappear when looking at a certain angle in Scene view and using Cloud Shadows with Volumetric Clouds
- StackOverflowException freezes or silently crashes the Editor
- Microsoft Surface Device freezes when detaching and reattaching physical keyboard attachment to a Microsoft Surface device in Standalone Player for Windows
- Shadows are cast with artifacts on GameObjects when the light type is set to Point
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.