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
- A bright horizontal line appears in Game view while underwater, when the cloud layer is enabled
- [HDRP] Clear coat materials produce screen-space reflections when the clear coat value is 0 in "Forward Only" Lit Shader Mode
- The alpha blending of transparent objects rendered to a RenderTexture is not rendered correctly in the Game View when in Play mode
- Scrolling on a default ScrollView in a WebGL build is too sensitive when compared to other platform builds and the Editor
- "Fix All" button does not disappear after applying fixes when setting up DXR
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.