since yesterday we’re testing with 3 guys the Unity asset server for our project. Before it was a real pain as we used Subversion and best practice was to let only one developer at a time change the assets for the game to not bork the svn version. We tried also the hint to exclude the lib and cache directories, but honestly it didn’t work very well for us as sometimes the head version got broken somehow.
So we yesterday moved our project into an asset server project hosted on my Mac Mini (exposed to the internet) and we ran into a few issues I’d like to ask how to avoid them. The 2 main problems we have now are the following:
After one developer commits changes and the other ones update the project, the changes do not always appear immediately, hence it is sometimes necessary to quit Unity and restart it to see the changes. Is this an issue happening only to us? Do we do something wrong? I would expect that Unity automatically updates all assets and the whole scene without any manual task involved. Do we need to do something after a checkout/update?
We found out it seems only one developer at a time can change and save a scene file. When 2 developers changed at the same time a scene, we had a conflict while committing, even when both developers changed different things in the scene. Can we avoid this somehow or are scene files something monolithic? I thought that Unity handles this and merges the scene of both together.
Would love to hear any experiences that you guys made.
You shouldn’t have to quit Unity, but you will need to do Server->Refresh Server View to rebuild the changed file list. Unity does this when it starts up, which is why quitting and restarting works for you.
Unfortunately scene files are monolithic and can’t be merged.
There are a couple of ways to avoid conflicts between developers. Of course just having one work on it at a time is the most sure-fire.
But more importantly, the more objects in your scene that are prefabs that are not modified in the scene, it can be as if the scene is more modular/granular.
That is, if a scene consists of prefabs that can be configured in the Project view, committing a change to that prefab will automatically fold into the scene without having to save and commit the scene.
Of course, if you are using different instances of the same prefab in the scene and have to modify it in the scene, then that developer will have to do it on the scene level and commit the scene.
But we have managed to minimize scene commits by having a lot of single-use prefabs as I described.
We use the asset server with five people. Overall it’s a good experience.
You shouldn’t need to reload Unity after any updates. You will need to re-open the level you’re working in, if that level was updated. This has bit us a few times; I wish Unity would throw a warning if you update the same level you have open.
As mentioned, levels are monolithic. Try to push everything into a prefab (and make sure to apply changes back to that prefab so they aren’t stored in the level). We all work in the same room, so we just call out our intentions when someone needs to touch the level.
Thanks for the information so far, very interesting.
Next question: Is it possible to have kind of “commit notification mails” so that the developers in the group of the project of the asset server get automatically a mail notification with the comments on the last check-in?