Author
Topic: How to Document, Backup and Version Control? (Read 798 times)

Let's talk about backing up of projects, documentation and version control. How do you do it? What's the best way to backup or version control Playmaker projects?

The standard answer is often "use git" or "use svn" or something similar, but it strikes me as insufficient when you don't need branching and merging, most of the stuff is engine (maintained by Unity), and the bulk of "important" files are scenes, prefabs, graphics and of course Playmaker FSMs and so forth, which seem to be binaries for which git etc is not good anyway. Below's what I got. Please share your tips and ideas, too

{1} First things first. Never have your project all over the Asset folder. Create a dedicated folder just for your files in assets, starting with an underscore, so it's always on top. Now you can backup that folder, and not worry about the engine files, and asset files which you can always pull fresh from Unity.

{2} Keep in mind one problem with this. If you work with an old Unity version and an old constellation of assets, you may want to backup those old asset versions separately. It seems to be not possible to later obtain an old version of an asset. However, you can install older asset packages that are in the Packet Manager.

{3} I use simple batch files (on windows) to make backups of my project and individual folders. Here are two versions (target folder will be created, too).

Clone / Sync FolderThis will clone a folder with everything it, can be used to mirror a directory. Make a .txt file, put the code below into it, adjust the two directories (test this first), and rename the file to .bat. Then run it.

ROBOCOPY "C:\mySourceFolder" "C:\myTargetFolder" /mirMake Backup VersionThis is similar, but you can easily store different versions, rather than overwriting or syncing a folder. Make an empty backup directory, and replace the directories! And this part "C:\myBackups" with your path. You can also customize the "Backup as:" text, e.g. to remind you of naming convention etc.

Tip: "C:\myBackups\Version (%Input%)" etc also works!Bonus Tip: Windows Key + E opens explorer, and clicking into the adress line above should give you the path to copy and paste. Extra Bonus Tip: you can also backup your internet cat picture collection this way.

{4} I've been on both extremes, of under- and over-documenting. Here's what works for me. Do not document things that change all the time. Also don't document what is better understood by looking at the files or game directly. Document either details that are hard to miss, or overviews that would require to study the project again to understand.

I also document workflow, so I don't forget some (occasionally arcane) steps I need to take to arrive at a result that worked before. I also document when something did not work, and why, to avoid going in circles. For example, I found out that Lightweight Renderer has no culling mask right now. I don't want to wonder someday why I'm not using it, install the whole thing only to see hours later that a crucial element was missing. I use a lean desktop wiki called WikiPad (free).

{5} For task management, I use Trello, but you can use something similar to get an idea what to do on a given session, which is a step up from a simple task list.

I use github with their 'github desktop' as this will backup online.with github desktop it became a lot user friendly.

Some advantages with github are that :

It is saved online so i can easily swap from my laptop to my pc,also easier when you work with more that 1 on a project.

You can add some description with each push and look back to every push you did.

You can revert only parts of the project (a prefeb, a certain scene, a changed image, etc) from earlier pushes.

You can do some test setup and you did save in unity, you can discard the changes inside Github desktop (one that i use regular)

I use a paid version so that i can have my projects private and i don't need to ignore files that are not allowed to be placed public (like PlayMaker)

on larger changes i tend to duplicate the scene or prefab (and add 1,2,3 etc or some code to know what was changed)

For documenting, i document almost everything.Some parts i document right away, some parts only after the fsm is working.I also document in a way that IF someone else would look at it, that he would understand whats going on.