On our next game we’re working on, we have probably 20 different Asset Store code plugins, so whenever I change one line of code, it ALL has to recompile, and it’s taking 20-30 seconds every time.
I consider that quite slow and slows down my progress. I’m running Windows 7 64-bit, solid state drive, 8Gb very fast RAM, CPU is i7 quad-core 3.2GhZ. Not a slow computer by any means. It’s about 6x faster than my Mac Mini purchased at the same time.
Is there anything I can do to speed up compilation by say a factor of 2 or more? Buying more RAM etc?
I thought about creating a DLL for most of the plugins whose code isn’t going to change and using that instead of the c-sharp source files, but that’s kind of a PITA.
I have dll files by default for my assets exactly because of that. Though the source code is also there, just in case but should usually not be needed. Interestingly, there are a lot of assets in the Asset Store that advertise with “No DLLs”, but in my opinion it should be the other way around which leads to that kind of unnecessary situation.
With a better CPU, you can slightly accelerate the compilation time, but with dlls, you basically get rid of lots of compilation time. If you want faster compilations times, dlls are your best bet. I am not sure whether there are still serialization issues with MonoBehaviour in dlls, so be careful about that and test whether you can switch between dlls and source code, just in case. Don’t blindly change, test upfront, because it is not always that easy. But there are a lot of tricks to make it workable.
Are you getting DLL’s from the download off the Asset Store? Or making the DLL yourself? I’m not aware that any of the plugins we use have DLL’s available…
You usually don’t have to reinstall the whole OS when you upgrade a CPU… unless you did massive alterations as well (new mobo and ram to go with a more to date cpu).
The cpu you describe though is pretty fast, it’s not like you’ll get much faster.
I agree with Dantus. Those assets you talk about aren’t really going to be edited by you, so yeah… try compiling them into a dll.
I was referring to my own packages in the Asset Store and for those I have to create the DLLs.
When I am working with other solutions from the Asset Store, I sometimes create DLLs on my own. There are packages that make it very hard. E.g. I gave up in trying to make NGUI usable within a DLL. If there are conditional compilations, it is usually not possible to create a DLL, if you need to switch between those. Now, in Unity 5, the situation became a lot better, because you can create DLLs on a per platform basis.