Asset Server Guide
Unity Manual > User Guide > Working with Assets > Asset Server Guide

Asset Server Guide

Unity Asset Server Overview

Unity Asset Server — это интегрированная в Unity система контроля ресурсов и версий с графическим пользовательским интерфейсом. Она используется командами, члены которых вместе удалённо работают над проектом с разных компьютеров. Asset Server отлично оптимизирован и может работать с очень большими ресурсами и многогигабайтными папками. Когда загружаются ресурсы, настройки импорта и другие метаданные о каждом ресурсе автоматически так же загружаются на сервер. Переименование и перемещение файлов поддерживается.

Сервер доступен только для Unity Pro и предоставляется дополнительной лицензией. Для покупки лицензии Asset Server Clien License посетите магазин: http://unity3d.com/store

New to Source Control?

If you have never used Source Control before, it can be a little unfriendly to get started with any versioning system. Source Control works by storing an entire collection of all your assets - meshes, textures, materials, scripts, and everything else - in a database on some kind of server. That server might be your home computer, the same one that you use to run Unity. It might be a different computer in your local network. It might be a remote machine colocated in a different part of the world. It could even be a virtual machine. There are a lot of options, but the location of the server doesn't matter at all. The important thing is that you can access it somehow over your network, and that it stores your game data.

In a way, the Asset Server functions as a backup of your Project Folder. You do not directly manipulate the contents of the Asset Server while you are developing. You make changes to your Project locally, then when you are done, you Commit Changes to the Project on the Server. This makes your local Project and the Asset Server Project identical.

Now, when your fellow developers make a change, the Asset Server is identical to their Project, but not yours. To synchronize your local Project, you request to Update from Server. Now, whatever changes your team members have made will be downloaded from the server to your local Project.

This is the basic workflow for using the Asset Server. In addition to this basic functionality, the Asset Server allows for rollback to previous versions of assets, detailed file comparison, merging two different scripts, resolving conflicts, and recovering deleted assets.

Setting up the Asset Server

Сервер настраивается единожды, клиентские программы — для каждого пользователя. Подробности о настройке — Asset Server Setup page.

The rest of this guide explains how to deploy, administrate, and regularly use the Asset Server.

Daily use of the Asset Server

Здесь объясняется, как использовать лучшим образом Asset Server в работе.

Getting Started

Если Вы присоединились к команде, которая уже работает с Asset Server, то это лучший способ изучить его. Если Вы начинаете свой собственный проект с нуля, то ознакомьтесь с Workflow Fundamentals.

Алгоритм для нового проекта:
* Создайте новый пустой проект без импортированных пакетов
* Выберите Window>Asset Server;
* Нажмите кнопку Connection;
* Введите имя пользователя и пароль;
* Нажмите Show Projects и выберите нужный проект;
* Нажмите Connect;
* Выберите закладку Update;
* Нажмите кнопку Update;
* Усли происходит конфликт, откажитесь от локальных версий;
* Ждите окончания обновления;
* Энжойнте на здоровье.  

Workflow Fundamentals

When using the Asset Server with a multi-person team, it is generally good practice to Update all changed assets from the server when you begin working, and Commit your changes at the end of the day, or whenever you're done working. You should also commit changes when you have made significant progress on something, even if it is in the middle of the day. Committing your changes regularly and frequently is recommended.

Understanding the Server View

Server View — это окно Asset Server, с которым установлено соединение. Можно открыть Server View через команду Window>Asset Server.


Закладка Overview.

The Server View is broken into tabs: Overview Update, and Commit. Overview will show you any differences between your local project and the latest version on the server with options to quickly commit local changes or download the latest updates. Update will show you the latest remote changes on the server and allow you to download them to your local project. Commit allows you to create a Changeset and commit it to the server for others to download.

Connecting to the server

Before you can use the asset server, you must connect to it. To do this you click the Connection button, which takes you to the connection screen:


The Asset Server connection screen


Здесь нужно ввести:
* Адрес сервера (Server);
* Имя пользователя (User Name);
* Пароль (Password);

Кнопка Show Projects показывает все доступные на сервере проекты. Выбираете нужный и жмёте Connect.

Updating from the Server

To download all updates from the server, select the Update tab from the Overview tab and you will see a list of the latest committed Changesets. By selecting one of these you can see what was changed in the project as well as the provided commit message. Click Update and you will begin downloading all Changeset updates.


The Update Tab

Committing Changes to the Server

When you have made a change to your local project and you want to store those changes on the server, you use the top Commit tab.


The Commit tab

Now you will be able to see all the local changes made to the project since your last update, and will be able to select which changes you wish to upload to the server. You can add changes to the changeset either by manually dragging them into the changeset field, or by using the buttons placed below the commit message field. Remember to type in a commit message which will help you when you compare versions or revert to an earlier version later on, both of which are discussed below.

Resolving conflicts

With multiple people working on the same collection of data, conflicts will inevitably arise. Remember, there is no need to panic! If a conflict exists, you will be presented with the Conflict Resolution dialog when updating your project.


The Conflict Resolution screen

Here, you will be informed of each individual conflict, and be presented with different options to resolve each individual conflict. For any single conflict, you can select Skip Asset (which will not download that asset from the server), Discard My Changes (which will completely overwrite your local version of the asset) or Ignore Server Changes (which will ignore the changes others made to the asset and after this update you will be able to commit your local changes over server ones) for each individual conflict. Additionally, you can select Merge for text assets like scripts to merge the server version with the local version.

If you run into a conflict while you are committing your local changes, Unity will refuse to commit your changes and inform you that a conflict exists. To resolve the conflicts, select Update. Your local changes will not automatically be overwritten. At this point you will see the Conflict Resolution dialog, and can follow the instructions in the above paragraph.

Reverting assets to an earlier revision

The Asset Server retains all uploaded versions of an asset in its database, so you can revert your local version to an earlier version at any time. You can either select to restore the entire project or single files. To revert to an older version of an asset or a project, select the Overview tab then click Get Earlier Versions (for whole project) or Browse Old Versions (for single files) listed under Asset Server Actions. You will now see a list of all commits and be able to select and restore any file to an older version.


The Get Earlier Versions dialog

The Browse Old Versions dialog

Here, you can see the version number and added comments with each version of the asset or project. This is one reason why descriptive comments are helpful. After hitting the Revert button, your local asset or project will be replaced with a copy of the selected version.

Prior to reverting, if there are any differences between your local version and the selected server version, those changes will be lost when the local version is reverted.

If you only want to abandon the changes made to the local copy, you don't have to revert. You can discard those local modifications by selecting Discard Changes in the main asset server window. This will immediately download the current version of the project from the server to your local Project.

Comparing asset versions

If you're curious to see the differences between two particular versions you can explicitly compare them. To do this, right-click an asset in the Browse Older Versions, select versions to compare and then choose Compare.

Note: this feature requires that you have one of supported file diff/merge tools installed. Supported tools are:

Recovering deleted assets

Deleting a local asset and committing the delete to the server will in fact not delete an asset permanently. Just as any previous version of an asset can be restored using Get Earlier Version, removed assets can be restored through Recover Files from the Overview tab.


The Recover Files dialog

After selecting assets from the list and hitting Recover Selected, the selected assets will be downloaded and re-added to the local project. If the folder that the asset was located in before the deletion still exists, the asset will be restored to the original location, otherwise it will be added to the root of the Assets folder in the local project.

Asset Server training complete

You should now be equipped with the knowledge you need to start using the Asset Server effectively. Get to it, and don't forget the good workflow fundamentals. Commit changes often, and don't be afraid of losing anything.