![editing a dll file editing a dll file](https://hshrzd.files.wordpress.com/2016/07/edit_fhdr.png)
![editing a dll file editing a dll file](https://img.youtube.com/vi/5gBNHJ7d3T8/sddefault.jpg)
The first thing we need to do is make a new C# project in Visual Studio. Fortunately, this particular problem comes from the side of Unity that lives in the UnityEngine.dll file, and C# files are quite easy to modify. Instead, let me explain how you - the developer - can fix this problem yourself, to an extent.
#Editing a dll file how to#
Here's the thing about closing bugs that are affecting people today hoping for a future redesign to fix it later - until this "later" comes, the problem will still keep affecting all 4.5 million Unity developers, and it can be (and usually is) years before gets resolved! And if someone submits a bug report with actual code on how to fix it - why not fix it? Boggles my mind.Īnyway - this post isn't meant to be a rant about Unity's choices - I'll do that in another one. Well, guys - fast forward to several years later - the bug is still there, all the way in Unity 2017.2, and no actions have been taken to address it. and yet - Unity refused to do anything about it, claiming that a future redesign of the system will fix it. The bug in question is glaringly obvious to anyone even with a little proficiency in C#, and stems from the lack of caching of expensive GetAttributes calls: Īmusingly, the bug has been reported to Unity years ago, alongside the code required to fix it ( ). That bug, is an absurd amount of GC allocations coming from the AttributeHelperEngine. I'm currently working on performance optimizations for Project 5: Sightseer, and a part of that involved editing the UnityEngine.dll to fix a nasty bug Unity introduced back in ~2014 that they seem to refuse to fix.