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
- Emissive Mesh emissiveness does not change when the Area Light intensity is animated through script
- No error notification is displayed when creating a tag with an already existing name
- Scripting API Manual Page's layout is broken when using Unity 6 manual version or above
- [Android] [iOS] Popping/crackling sound occurs when the app is repeatedly brought to the background and foreground while the sound is playing
- UI Builder unloads UXML file and discards any unsaved changes when entering Play Mode with Domain and Scene Reload enabled
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.