Today, I set out to finish decorating levels in EARL’s Warehouse: The Depot, adding physical representations of lights, more beams and trusses, and of course, lots of tongue-in-cheek signage. All was going well for a couple of hours, then, suddenly, the level editor crashed while saving the master map for The Depot. It turns out I was pushing dangerously close to the 32-bit process memory limit with both the Unity IDE and the level editor loaded. When I reloaded, I discovered a zero-byte file in the place of the master map, almost 3 months of work on that beautiful masterpiece gone.
Except… Wise Duke had a version control system in place, with commits made at the end of every work session, plus a fairly extensive history of server backups to choose from. Instead of losing almost 3 months of work, I lost only two hours of work!
I immediately changed my editor to make a hard backup of any file replaced while saving, turned down the egregiously high view distance in my editor to reduce memory usage, and was able to resume work and actually complete my goal of decorating The Depot today.
All the time I spent earlier this year upgrading my server, my version control system, and my backup system really paid off. If you are doing any sort of serious software development, make sure you have these things in place. Bad things do happen to good files, and preparing for that inevitability is well worth your while.
Also, if you are creating a custom editor for your project assets, strongly consider implementing a system that will back up replaced files on save. If I had that in place before today’s visit by mayhem, I would have lost maybe five to ten minutes of work.