- Home /
Unity recompilation time slowly increases each time it's recompiled. Why?
After working within Unity for a couple of hours, my compiling times go from a couple seconds to easily ~15-20.
I've checked Task Manager, and the memory usage does indeed increase over time, starting around 620MB and ending at 790MB before I just close out the Editor and re-open it.
Now as to figuring out why this happens, my first thought was the way my program creates/loads/saves configuration files as ScriptableObjects. However, one instance is always loaded, and the contents are never duplicated so that being the culprit wouldn't make much sense.
I've subscribed to AssemblyReloadEvents.beforeAssemblyReload
with the code Resources.UnloadAsset(Instance);
to ensure my configuration instance is unloaded, but Unity should take care of that, right?
So why else would this be happening? Is this generic garbage collection that I can't avoid? Or could it possibly be something within my code that I need to look for?
Thanks in advance for any help.