Working on unity project from multiple devices?

Is there any way to work on a project from multiple devices (not at the same time) and syncing the changes? I use a laptop to work on my game when I am not home but when I am I prefer to use my desktop. Is there a more convenient (and free) option apart from manually copying and importing the project between devices? Any help is greatly appreciated.

Update: I setup this blog post in response to this question, due to the nature of the complexity of the answer needed. Unity-Git-SCM-Example/blog.md at blog/unity-scm-tip · SlagleSoft/Unity-Git-SCM-Example · GitHub

Note: this actually applies for any “development” project, I will try to be brief about this subject, because it can go in great detail, esp if you haven’t used Source Control before. More detail slightly falls out of context here.

You want to look into Source Control, I highly recommend Git, and the SourceTree UI App.

Git: https://git-scm.com/

SourceTree: https://www.sourcetreeapp.com/

GitHub: https://github.com/

BitBucket: https://bitbucket.org/

Github and Bitbucket are the two leading PAAS web solutions out there. Extremely quick to get setup, something to help you pick a solution. Github is free for open source projects (anyone can see them), while Bitbucket has free private projects (you say who can see it, up to 5 for free).

Now to target your question more specifically, Unity project “sharing”.

First, you will want to make your Unity project source controllable, this means turning on visible Meta files, and force text format for Unity files.

Open your project in Unity, then

Goto: Edit -> Project Settings -> Editor
Set: Version Control -> Mode = Visible Meta Files
Set: Asset Serialization -> Mod = Force Text

These settings get you ready for base level Source Control for Unity projects. I say base level because this only handles Text based files. Other assets such as Images, Models, etc. Are still in Binary format. Git handles this “fine” normally, but for Larger files, ie Models, you need an extra layer on Git to handle them.

Git LFS: https://git-lfs.github.com/

Git LFS - Large File Storage. By installing this module, Git now handles Large binary files much better.

Now to breifly discuss taking this even further, fine grain control over how Git handles files. Features like these is why I recommend Git, other Source Control platforms offer them, but imo Git offers them in a nice uniform and easily understood way.

.gitignore file (no file name, just extension)
This file goes in the projects root folder. It is used to “Ignore” files, ie they are not checked into Git. These are files only needed locally, and are either generated by the project or customized by the local user and don’t apply to everyone working on the project.

Here is a base starting point for the Git Ignore file when using Unity:

.gitattributes file (no file name, just extension)
This file goes in the projects root folder. It is used to inform Git how to handle files, often it handles them just fine, but never hurts to have insurance. How merges are handled is the main focus we take for Unity in this file. When using Git LFS (recommend it) we can apply a few extra values in this file.

Here as a base starting point for the Git Attributes file when using Unity with Git LFS:

More info regarding Unity Source Control:
https://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html

If you need any more details just ask, I am also willing to setup a public Github example Unity project to give you more of an idea if needed.

Edit: Alternate Solutions

I wanted to cover the subject just a little bit more, I mentioned Source Control (which is by far the best solution for any development project). Why is Source Control the best solution? Because it was meant for this type of task (more specifically sharing projects with multiple people). Source Control keeps a history of every change made in the file(s). Everything is stored locally as well as on a central server, the server is where everyone downloads the project and submits their changes to (and download others changes, sync changes, etc). Source Control helps handle Merge Conflicts when the same file(s) are changed by multiple people (or change sets, ie Branching). But I digress, getting off topic of the context of other solutions.

Source Control can be “scary” at first and seem overwhelmingly complex (it’s not I promise). BUT, there are other ways to achieve a similar goal. Also note, if multiple people are working on the project, these solutions become even less valid.

Any software, service or anything of the like, built for “sharing” or “backing up” files could be used for working on a project from multiple devices. Anything as basic as FTP or Windows File Share, up to more indepth solutions such as Google Drive, Windows One Drive, Dropbox, etc. The idea is quite similar to Source Control, you have files locally, and you have files stored at a central server. Personally I wouldn’t recommend any of these, as the risk of lost work is just too high (override the wrong file, there may not be an undo). I only mention these because I often find people fear change just a little too much to take on something like proper Source Control.