Asset Server 整理

 

 

 

 

 

资源服务器指南 Asset Server Guide

Date:2012-11-23 11:00

Unity Asset Server Overview
Unity资源服务器概述

The Unity Asset Server is an asset and version control system with a graphical user interface integrated into Unity. It is meant to be used by team members working together on a project on different computers either in-person or remotely. The Asset Server is highly optimized for handling large binary assets in order to cope with large multi gigabyte project folders. When uploading assets, Import Settings and other meta data about each asset is uploaded to the asset server as well. Renaming and moving files is at the core of the system and well supported.

Unity资源服务器是一个集成在Unity中的图形用户界面的资源与版本控制系统。这意味着团队成员可以在一个项目中使用不同的电脑直接或间接地一起工作。资源服务器针对巨大二进制资源的管理进行了高度优化,用于处理巨大的数十亿字节的工程文件夹。当上传资源的时候,对于每一个资源的导入设置和其他元数据也上传到资源服务器。重命名和移动文件在系统核心中被很好的支持。

It is available only for Unity Pro, and is an additional license per client. To purchase an Asset Server Client License, please visit the Unity store at http://unity3d.com/store

它只在Unity Pro版本中可用,并且对每个客户端有附加的许可条件。如要购买一个资源服务器客户端许可证,请访问Unity商店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.

如果你以前从未用过源码控制,任何的版本系统都会显得有一点不友好。源码控制是将你所有资源(网格模型,贴图,材质,脚本和所有其他资源)存储为某种服务器上一个数据库中的条目集合。这个服务器可能是你的家用电脑,跟你运行Unity的是同一台机器。也可能是你本地网络中一台不同的电脑。还可能是世界上放在不同地方的远程机器。还可能是一台虚拟机器。这里有很多选择,但服务器的位置已经不重要了。重要的是可以通过你的网络访问它,而它存储了你的游戏数据。

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.

现在,当你的开发者同事做了一个改动,资源服务器将与他的工程同步,而不是你的。如要同步你的本地工程,你需要从服务器上更新(Update from Server)。现在,不管你的团队成员们做了些什么改动你都可以从服务器将改动下载到本地项目。

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.

这是使用资源服务器的基本工作流程。除了基本功能之外,资源服务器允许回滚到资源以前的版本,文件具体细节的比较,融合两个不同的脚本,解决冲突,和恢复已经删除的资源。

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

这份指南的其他部分描述了如何部署,管理,和常规使用资源服务器

页面最后更新: 2007-11-16

分类: Components| 翻译: 掌门归来

 

 

 

 

 

 

 

设置资源服务器 Setting up the Asset Server

Date:2012-07-20 04:03

Server-side Installation 服务器端安装

The Asset Server is designed to be a simple one-time installation on a server machine. Interacting with the Asset Server is done through Unity. Unity can be installed on the server machine, but it does not need to be. It must be administrated from a Client machine, where Projects and Users can be added. Each additional client must be configured to synchronize with a Project, using a specific User credential.

资源服务器被设计成简单的一次性安装到服务器机器上。资源服务器与Unity之间的相互关系已经设置好了。Unity可以安装到服务器机器上,但并不是必须的。服务器必须从一个能够添加工程和用户的客户端机器来管理。每一个添加的客户端必须初始化成这样,使用一个指定的用户证书从一个工程同步。

You can install the Asset Server on Mac OS X 10.4 or later, Windows XP, Windows Vista and various Linux distributions including CentOS, Ubuntu and Suse Linux. Download Unity Asset Server from here.

你可以在如下系统上安装资源服务器:Mac OS X10.4或更高版本,Windows XP, Windows Vista和各种各样的Linux发布版包括Cent OS,Ubuntu和Suse Linux。从这里下载Unity资源服务器。

The installer will install all necessary files, setup a database and launch the Asset Server. At the end of the process you will be asked to create an Admin password. This password is required to administer the Asset Server from within Unity. You must connect to the Asset Server as the administrator before you can create any projects or users.

这个安装包将安装所有必需的文件,设置数据库并启动资源服务器。这个过程结束的时候你会被要求创建一个管理员密码(Admin password)。这个密码是管理Unity内建的资源服务器所必需的。在你可以创建任何工程或用户之前,你必需作为管理员角色连接到资源服务器。

Administrating the Asset Server 管理资源服务器

The Asset Server allows any number of Users to connect to a Project. The Administrator must first connect to the Server with Unity as a client and create new Projects and Users.

资源服务器允许任意数量的用户(Users)连接到一个工程(Project)。管理员必需先使用Unity作为客户端连接到服务器并创建工程和用户。

To access the Administrator controls, launch Unity and select Window->Asset Server, then click the Administration button.

要访问管理员控制面板,打开Unity并选择菜单Window->Asset Server,然后点击Administration按钮。


The Administration tab 管理标签页

In the Server Address field, enter either the ip address or host name of the computer running the Asset Server that you want to administer. If the Asset Server is installed on your local machine, you can use "localhost" as the Server Address. Next, provide the administrator name and password. The administrator name is always "admin", and the password is what was entered when installing the Asset Server. Finally, hit the Connect button. You're now connected to the Asset Server, and can perform the initial setup.

在服务器地址(Server Adress)栏,输入IP地址(ip adress)或计算机的主机名(host name)来运行你所要管理的资源服务器。如果资源服务器安装在你本地的机器上,你可以使用"localhost"作为服务器地址(Server Address)。接下来,输入管理员名称和密码。管理员名称固定使用"admin",密码是安装资源服务器时所输入的密码。最后,点击连接(Connect)按钮。你现在连接到了资源服务器,并且可以执行初始化设置了。

Managing Projects and Users 管理工程和用户

Each Server can contain several Projects, and each User can have permission to one or more Projects. Projects are generally orthogonal, and unique in asset collections. It is best to think "one Project equals one game".

每一个服务器都可以包含许多工程,并且每一个用户可以允许有一个或者多个工程。工程通常是正交的,并且独立于资源集合。最好这样想"一个工程等于一个游戏"。

New Projects can be created by clicking on the Create button in the Server Administration tab.

新的工程可以通过点击服务器管理(Server Administration)标签页上的创建(Create)按钮来创建


Click Create, then enter a name for the new project
点击创建(Create),然后输入新工程的名称

New users can be created by first selecting an existing project and then clicking on the New User button.

新的用户可以这样创建,首先选择一个已经存在的工程然后点击新建用户(New User)按钮。


Creating a new user 创建一个新用户

After a user has been created in one Project, the user can be added to another project by enabling the checkbox on the left of the user name in the users list.

当一个用户在一个工程里被创建,选中在用户列表的用户名左侧的选择框,允许这个用户添加到其他的工程里。

You can enable or disable user access for individual projects. To completely remove a project or user from the server use the Delete Project and Delete User buttons.

你可以允许或不允许用户访问个别的工程。从服务器完全的删除一个工程或用户使用删除工程(Delete Project)和删除用户(Delete User)按钮。

Firewall settings 防火墙设置

The Unity Asset Server uses TCP port 10733. You might need to enable connections to this port in your firewall and/or router.

Unity资源服务器使用TCP端口10733。你可能需要设置你的防火墙和/或路由器以允许连接到这个端口。

Advanced 高级

The Asset Server is built using a modified version of PostgreSQL. Accessing the SQL database directly requires a bit of technical knowledge about SQL and Unix/Linux command lines. User discretion is advised.

资源服务器使用一个修改版本的PostgreSQL构建。直接访问SQL数据库需要一点关于SQL和Unix/Linux命令行的技术知识。建议用户谨慎操作。

Backing up 备份

We have provided a command line tool to back up an asset server. The tool should be run from an administrator account on the machine running the asset server. Replace BACKUP_LOCATION with the path name you want the backup tool to place the backups:

我们提供了一个命令行工具用于备份一个资源服务器。这个工具需要运行资源服务器的机器上的管理员账号来执行。用你想使用的目录覆盖掉BACKUP_LOCATION宏,备份工具会将备份放置到此处。

Mac OS X
sudo /Library/UnityAssetServer/bin/as_backup BACKUP_LOCATION

Linux
sudo /opt/unity_asset_server/bin/as_backup BACKUP_LOCATION

Windows
"\Unity\AssetServer\bin\as_backup.cmd" BACKUP_LOCATION 

as_backup will create a directory at BACKUP_LOCATION containing one or more files per project plus files containing information about each project and a backup of all users and their passwords.

as_backup命令将在BACKUP_LOCATION处创建一个包含每个工程中一个或者多个文件的目录,另有包含每一个工程和所有用户密码备份的信息文件。

Restoring a Backup 恢复一个备份

To restore an Asset Server backup produced with as_backup, first perform a clean installation of the Asset Server without any projects created. (The restore procedure will refuse to overwrite already existing projects with the same name.)

要恢复一个使用as_backup命令产生的资源服务器备份,首先安装一个没有创建任何工程的干净的资源服务器。(恢复程序将拒绝覆盖已经存在的同名工程。)

Then run the provided backup restoration tool, as_restore pointing it to the location of a backup created with as_backup:

然后运行提供的备份恢复工具,as_restore命令,参数指向使用as_backup创建的一个备份位置。

Mac OS X
sudo /Library/UnityAssetServer/bin/as_restore BACKUP_LOCATION

Linux
sudo /opt/unity_asset_server/bin/as_restore BACKUP_LOCATION

Windows
"\Unity\AssetServer\bin\as_restore.cmd" BACKUP_LOCATION 

Note that you can also use as_backup and as_restore to move an asset server installation from one machine to another by performing the backup on the source machine, moving the backup directory to the destination machine (or mount it through a network file share,) and then running as_restore to insert the data into the newly installed Asset Server instance. This will even work when the source and destination Asset Servers have different versions or are running on different operating systems.

注意你可以使用as_backup命令和as_restore命令把一个资源服务器安装从一个机器移动到另外一个机器,只需在源机器上执行备份命令即可,并移动备份目录到目标机器(或者通过一个网络文件共享来配置,)然后运行as_restore插入数据到新安装的资源服务器实例。这个方法在源和目标资源服务器版本不同或是运行在不同操作系统上的时候同样适用。

Locating the database name of an Asset Server Project
定位一个资源服务器工程的数据库名称

To view the tables in a Project database, first you need to figure out the name of the actual database. Run this command line command on the machine hosting the Asset Server:

如要查看一个工程数据库中的表,首先你需要指定已有的数据库的名称。在资源服务器运行的机器上运行这个命令行命令:

Mac OS X
/Library/UnityAssetServer/bin/psql -U admin -h localhost -d postgres -c 'select * from all_databases__view'

Linux
/opt/unity_asset_server/bin/psql -U admin -h localhost -d postgres -c 'select * from all_databases__view'

Windows
"\Unity\AssetServer\bin\psql.exe" -U admin -h localhost -d postgres -c "select * from all_databases__view" 

This and other commands will prompt you for a password. Every time this happens, enter the admin password for the database, which was set during the installation. The result will be a table that follows this basic layout:

这个命令和其他的命令会要求你输入一个密码。每当这种情况时,输入数据库安装时设定的管理员密码。得到的结果将是如下所示的基本布局:

    databasename    |    projectname     |       description        | version 
--------------------+--------------------+--------------------------+---------
 sandbox            | Sandbox            | Created with Unity 2.0.0 | 1.0
 game               | Game               | Created with Unity 2.0.0 | 1.0
 my_game_project    | My Game Project    | Created with Unity 2.0.0 | 1.0
(3 rows)

Now you need to identify the "databasename" of the Project you want to back up. When creating a database, the default "databasename" is same as the "projectname" as shown inside Unity, but in lowercase and spaces replaced with underscores.

现在你需要指定你所要备份工程的"数据库名称(databasename)"。在创建一个数据库时,"数据库名称(databasename)"与Unity中显示的"工程名称(projectname)"相同,但是全部是小写字母并且用下划线代替空格。

Note that if your server hosts multiple PostgreSQL databases on different ports you nay need to explicitly provide the port used to connect to the Asset Server database. In this case add -p 10733 to the commands given (assuming you have used the default port of 10733 for your instance.) For example:

注意如果你的服务器使用不同的端口安装有多个PostgreSQL数据库你可能需要明确的指定连接到资源服务器数据库所使用的端口。在这种情况下给命令行添加参数-p 10733(假定你的服务器实例使用默认的端口10733)例如:

Linux
/opt/unity_asset_server/bin/psql -U admin -h localhost -d postgres -c 'select * from all_databases__view' -p 10733

Additional SQL Functions
其他的SQL功能

These and all other commands use tools from the PostgreSQL distribution. You can read more about these tools here: http://www.postgresql.org/docs/8.3/interactive/reference-client.html

这些和所有的命令使用PostgreSQL发布版中的工具。你可以在这里找到更多关于这些工具的信息:

页面最后更新: 2009-09-22

分类: Components| 翻译: 掌门归来

 

 

 

 

 

资源服务器的日常使用 Daily use of the Asset Server

Date:2012-07-20 04:53

This section explains the common tasks, workflow and best practices for using the Asset Server on a day-to-day basis.

这一部分讲的是通用任务,工作流程和基于日常资源服务器使用的惯例。

Getting Started 开始

If you are joining a team that has a lot of work stored on the Asset Server already, this is the quickest way to get up and running correctly. If you are starting your own project from scratch, you can skip down to the Workflow Fundamentals section.

如果你加入一个已经有大量工作存储在资源服务器上的团队,这是开始工作和正确运行最快的方法。如果你从头开始你自己的项目,你可以翻到工作流程的基本原理(Workflow Fundamentals)章节。

  1. Create a new empty Project with no packages imported
    创建一个没有导入任何包的新的空工程
  2. Go to Edit->Project Settings->Editor and select Asset Server as the version control mode
    找到Edit->Project Settings->Editor并在版本控制模式下选择资源服务器(Asset Server)
  3. From the menubar, select Window->Version
    从菜单栏选择Window->Version
  4. Click the Connection button
    点击连接(Connection)按钮
  5. Enter your user name and password (provided by your Asset Server administrator)
    输入你的用户名和密码(从你的资源服务器管理员处获得)
  6. Click Show Projects and select the desired project
    点击显示工程(Show Projects)并选择想要的工程
  7. Click Connect
    点击连接(Connect)
  8. Click the Update tab
    点击更新(Update)标签页
  9. Click the Update button
    点击更新(Update)按钮
  10. If a conflict occurs, discard all local versions
    如果发生冲突,忽略所有的本地版本
  11. Wait for the update to complete
    等待更新直到完成
  12. You are ready to go
    现在你准备好啦

Continue reading for detailed information on how to use the Asset Server effectively every day.

继续每天阅读如何有效的使用资源服务器的细节信息。

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 理解服务器视图

The Server View is your window into the Asset Server you're connected to. You can open the Server View by selecting Window->Version Control.

服务器视图(Server View)就是你连接到的资源服务器的窗口。你可以选择Window->Version Control打开服务器视图。


The Overview tab 概览标签页

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.

服务器视图被划分成几个标签页:概览(Overview),更新(Update),和提交(Commit)。概览(Overview)将显示你本地项目和服务器上最后一个版本的所有区别,并有选项可以快速的提交本地更改或是下载最后的更新。更新(Update)将显示服务器上之后的更改并允许你下载到你本地的工程。提交(Commit)允许你创建一个更改集合(Changeset)并提交到服务器供其他人下载。

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:

在你可以使用资源服务器之前,你必需连接到服务器。你点击连接(Connection)按钮来连接,这将把你带到连接页面:


The Asset Server connection screen 资源服务器连接截屏

Here you need to fill in:

这里是需要你填写的:

  1. Server address 服务器地址
  2. Username 用户名称
  3. Password 密码

By clicking Show projects you can now see the available projects on the asset server, and choose which one to connect to by clicking Connect. Note that the username and password you use can be obtain from your system administrator. Your system administrator created accounts when they installed Asset Server.

点击显示工程(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.

要从服务器上下载任何更新,在概览标签页(Overview)中选择更新(Update)标签页之后你将看到最终提交更改集合的列表。通过选择其中一个你可以看到工程中都改变了些什么还有提供的提交信息。点击更新(Update)然后你可以开始下载所有的更改集合更新。


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.

当你对你本地的工程做了一些修改然后你想把这些更改保存到服务器上,使用顶部的提交(Commit)标签页。


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.

当多个人在同一个数据集上工作,冲突将会不可避免的发生。记住,这不需要恐慌!如果存在一个冲突,当年你更新你的工程时将显示给你一个冲突解决(Conflict Resolution)对话框。


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.

看,每个单独的冲突都会通知你,并且带有解决每个单独冲突的不同的选项。对任何的单个冲突,你可以为每个单独的冲突选择忽略资源(Skip Asset)(这将不会从服务器下载这个资源),丢弃我的修改(Discard My Changes)(这将会完全的覆盖掉你这个资源的本地版本)或者忽略服务器修改(Ignore Server Changes)(这将会忽略别人对这个资源所做的修改并且这次更新后允许你提交你的本地修改以覆盖掉服务器上的版本)。另外,你可以为文本资源如脚本选择融合(Merge)来融合服务器版本和本地版本。

Note: If you choose to discard your changes, the asset will be updated to the latest version from the server (i.e., it will incorporate other users' changes that have been made while you were working). If you want to get the asset back as it was when you started working, you should revert to the specific version that you checked out. (See Browsing revision history and reverting assets below.)

注意:如果你选择丢弃你的修改,资源将被更新到服务器上最新的版本(也就是说,这将包含其他用户在你工作期间所做的的更改)。如果你想要找回当你开始工作时的资源,你需要恢复到你检出的指定版本。(参看下面的浏览历史版本和恢复资源。)

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.

如果在你提交你的本地修改时遇到冲突,Unity将拒绝提交你的修改并提示你存在一个冲突。要解决这些冲突,选择更新(Update)。你的本地更改将自动被覆盖。在这一点上你可以查看冲突解决(Conflict Resolution)对话框,并按照上面段落中的指令操作。

Browsing revision history and reverting assets
浏览历史版本并恢复资源

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 Show History listed under Asset Server Actions. You will now see a list of all commits and be able to select and restore any file or all project to an older version.

资源服务器在它的数据库中保留了所有上传的版本,所以你能够恢复你的本地版本到一个任意时间的早期版本。你还可以选择还原整个工程或是单个文件。若要将一个资源或一个工程还原到一个旧的版本,选择概览(Overview)标签页然后点击列出在资源服务器动作(Asset Server Actions)下的显示历史(Show History)。你现在将可以看到一个所有可选择并还原任意文件或所有工程到一个旧版本的提交列表。


The History 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. Select any asset to see its history or Entire Project for all changes made in project. Find revision you need. You can either select whole revision or particular asset in revision. Then click Download Selected File to get your local asset replaced with a copy of the selected revision. Revert All Project will revert entire project to selected revision.

在这里,你能够看到版本号和资源或工程的每一个版本的附加注释。这是为何描述注释会有所帮助的一个原因。选择任意的资源查看其历史或选择整个工程(Entire Project)查看对工程所做的所有修改。找到你需要的修订。你可以选择整个修订或是修订中的一部分。点击下载选择的文件(Download Selected File)使用一个选择的修订副本替换掉你的本地资源。恢复所有工程(Revert All Project)将恢复整个工程到选定的修订。

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.

如果你仅仅想要丢弃对本地拷贝所做的修改,你不需要进行恢复。你可以选择主资源服务器窗口中的丢弃修改(Discard Changes)丢弃这些本地修改。这将立即从服务器下载工程的当前版本到你的本地工程。

Comparing asset versions 比较资源版本

If you're curious to see the differences between two particular versions you can explicitly compare them. To do this, open History window, select revision and asset you want to compare and press Compare to Local Version. If you need to compare two different revisions of an asset - right click on it, in the context menu select Compare to Another Revision then find revision you want to compare to and select it.

如果你很好奇想要看看两个指定版本之间的不同你可以明确的比较它们。想要做到这一点,打开历史(History)窗口,选择你想要比较的修订和资源并按下与本地版本比较(Compare to Local Version)。如果你需要比较一个资源的两个不同的修订——在它上面右键点击,在上下文菜单中选择与另外的修订比较(Compare to Another Revision)然后找到你想要比较的修订并选择它。

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

注意:这个特性需要你安装有支持文件比较、融合(diff/merge)的工具。支持的工具有:

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 through History window from the Overview tab.

删除一个本地资源并提交删除到服务器实际上并不会永久地删除一个资源。仅仅是像任何之前的版本一样一个资源可以从概览(Overview)标签页通过历史(History)窗口还原。


The History dialog 历史对话框

Expand Deleted Assets item, find and select assets from the list and hit Recover, 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.

展开删除的资源(Deleted Assets)项,从列表中找到并选择资源然后点击还原(Recover),选择的资源将会下载并重新添加到本地的工程中。如果资源在删除之前所在的文件夹依然存在,资源将被还原到原始位置,否则它将被添加到本地工程中的资源文件夹根目录下。

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.

你现在应该已经具备了开始实际使用资源服务器所需的知识。开始吧,不要忘记好的工作流程是必要的。经常提交修改,并且别害怕忘记什么。

页面最后更新: 2012-01-18

分类: Components| 翻译: 掌门归来

 

 

Unity3D游戏制作(四)——Asset Server搭建

本系列文章由 Amazonzx 编写,欢迎转载,转载请注明出处。

http://blog.csdn.net/amazonzx/article/details/7980117


Asset Server是目前Unity内部自带的资源版本管理工具,类似于我们平时所熟知的SVNperForce,但对于目前的UnityAsset Server要比SVNperForce等版本控制软件要好用一些,因为Unity3.x版本对于SVN等软件的支持并不是很好,在多人协同工作时,经常会发生数据丢失等情况。因此,本文重点介绍一下Asser Server的搭建方法。至于日常用法,其实与SVN等软件的用法非常相似,所以在这里就不多讲了。

关于Asset Server的搭建步骤,其实官网论坛上已经有了解释得比较详细明了,在这里,我只将其归纳总结一下,使其更加清晰明了。Asset Server的搭建步骤如下所示:

 

1、  首先去官网下载Asset Server工具,地址为:http://unity3d.com/unity/team/assetserver/。下好后在你的服务器上进行安装,这里有个重要的地方,即Asset Server的密码设置,界面如下,这个密码即为以后Asset Server的管理员密码。



2、 安装好后,运行Unity,通过“Window->Asset Server”打开Asset Server界面,如下所示:



3、 点击上图中的“Administration”,可打开如下界面:



4、 Server Address输入“localhost”,User Name输入“admin”,然后输入安装Asset Server时设置的密码,即可进行连接,连接成功后,右侧“Admin Actions”中的前两项会被点亮,如下所示:



5、 点击“Create”即可在服务器端建立起一个新的项目,再点击“New User”可对于该项目配置用户。点击“Create”后,会让你输入新的项目名称,假设为“AA”,界面如下:



6、 点击“Create Project”即可建立起一个名为“AA”新的空项目。点击项目AA,你会发现“Admin Actions”中的按钮全部变亮,即你可以对项目进行拷贝、删除等操作。



7、 在“User”中只有“admin”管理员用户,要想创建其他用户,可点击“New User”来建立。



8、 填好信息后,即可创建新用户,如下图所示:



9、 以上操作则在服务器上建立了一个新的空项目,以及新的用户,下面就介绍如何将已有项目资源导入到该空项目中。右键点击项目AA,选择“Connection”,即会出现如下界面:



10、输入Server IP,服务器则输入“localhost”,用户名和密码,点击“Show Projects”则可看到当前服务器上的项目名称,选择你想连接的项目,即可进行连接,如下图所示:



11、点击“Connect”,经过一段时间等待以后,即会出现如下界面:



12、右侧的后缀为“绿色New”的资源是表明该资源对于服务器来说是新的(因为当前服务器项目为空,所以所有资源全是New),需要进行Commint。点击“Commit”,则出现如下界面:



13、点击Add All后,即可进行Commit上传资源了,自此,服务器上的Asset Server搭建完毕,其他用户可以通过创建新用户来进行资源的下载和上传。


 

 

 

 

 

 

Unity——Export/ImportPackage功能和项目管理的研究

     在使用Unity开发游戏项目时,一般都需要多人同时工作。例如每人负责不同的场景,或者一些人负责调试光照和渲染,另一些负责编写程序逻辑。总之一个人全包的情况对于稍大一点的项目而言少之又少。但遗憾的是Unity对协同项目工作和大型项目的支持可以用糟糕来形容。人力资源

     首先,Unity没有模块化开发的概念。我们知道模块化是开发大型项目必须的一种实践方法。例如用VC开发大型程序时,我们可以把程序拆分成多个dll项目来开发,由此减少单个项目的复杂度和编译时间。另一个例子是flash程序的开发,同样可以把工作拆分成多个flash项目,最后将每个项目生成的swf或者swc合在一起工作。

     然而到目前的3.0版本为止,Unity仍然不支持类似dll或者swc/swf这种模块化构建应用程序的方法。对Unity而言,一个游戏就是一个工程。如果游戏规模很大,包含很多资源,那么项目就不可避免地变得臃肿和难以维护。Unity在打开、刷新、编译这类工程时也会耗用更多的时间。以至于在Unity官方论坛上都能看到许多这方面的抱怨。例如这篇帖子answers.unity3d/questions/19688/splitting-complex-project-into-multiple-projects就详细地描述了一个770M左右大小的项目所面临的困境营销案例报告汇编(最新精编)(24个ppt21个doc):http://www.cnshu.cn/vip/288475.html。

     其次,Unity会将项目信息以二进制格式保存在library目录中,其中被称为元数据(MetaData)的信息更是记录了构成游戏的许多关键数据(例如模型导入所使用的各项设置、Asset之间的引用关系等)。但由于这些数据是二进制格式,并且存放方式很不清晰,因此在使用SVN等版本管理系统时,无法采取多人修改-合并的方式。只能一个人改完后,提交整个项目,然后下一个人再改。严重阻碍了项目协同。Unity官方提供了一个收费的AssetServer,我没有用过,不知能否解决这个问题。如果我们能通过一些手段让免费的svn发挥作用,何乐而不为呢?

     对于Unity的第一个缺点,我们暂时没有好的办法来解决,只能希望Unity后续的版本能提供模块化的支持。(Unity和ExitGame近期宣布展开合作,推出一款针对MMOG开发的产品组合。Unity将推出一个叫Legion的版本,与ExitGame的Photon配合。我猜测Legion应该对大型游戏项目要支持得更好些吧。)

     至于第二个缺点,我们可以用Unity的输出/导入包(Export/ImportPackage)功能,配合svn在一定程度上加以解决。

用“输出/导入包(Export/Import Package)”功能实现项目协同

Unity的Export/ImportPackage功能主要用途是在不同的项目之间实现asset复用。该功能的基本介绍和操作详见官方文档,本文将进一步描述该功能的具体表现,以及如何利用该功能实现多人项目的协作。

导入导出包功能具有下列特性:

在导出时,Unity会记录导出内容在项目中的完整路径,并在导入时重建对应的目录结构。因此我们可以方便地在项目间同步目录。导出时,Unity会让你选择是否导出被依赖的内容。如果钩选择会自动添加被依赖的内容,并显示在列表中。如下图。

不导出依赖

导出依赖

导入时,Unity会判断当前项目中是否存在名称、路径完全相同的文件。若有,则判断修改时间是否一致,若一致就忽略,否则会提示是否覆盖。注意Unity并不管文件的新旧,只是简单地询问用户是否用包中的文件覆盖项目中的同名文件。如下图: 

 

最重要的是, 广告营销策略大全(最新精编)(4个ppt5个doc)Unity输出包时,还包含了asset对应的元数据。用WinRAR或者其他压缩软件打开Unity导出的.unitypackage文件,就可以看到这些元数据文件,如下图:

     正是由于导出的包自动包含了相关元数据信息,弥补了用SVN无法管理这些数据的缺陷,我们就可以将二者配合使用,达到多人在一个项目中协同工作的效果。具体建议如下:

  1. 首先用SVN建立对整个项目文件夹的管理,包括asset和library目录以及下面的文件;由负责集成的项目组成员管理并提交该项目更新到svn数据库其他协作人员从svn数据库下载最新的项目文件协作人员对自己负责的内容进行工作,然后将成果输出。输出时不要钩选依赖将输出的unitypackage文件提交给集成人员(通过svn或者其他途径都可以)集成人员将新的unitypackage导入项目,然后再提交到svn数据库

     如果对人员分工、规范以及项目目录规划得好的话,采用这种方式完全可以实现多人同时工作,提高项目开发和迭代的效率。如果有朋友提供更好的建议,也希望不吝赐与众分享。有关Unity的其他话题也可以查阅我的其他文章。关于本文内容,我可能会再有进一步心得后加以完善。

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值