Unity はアドオン製品として アセットサーバー (チームライセンス) を提供し、 バージョン管理の統合(チームライセンス)を容易にします。なんらかの理由で Unity Asset Server を使用できない場合も、Perforce、PlasticSCM といった外部のバージョン管理システムにプロジェクトを格納することができます。なんらかの理由でこれらのシステムが使用できない場合は Subversion や Bazaar も使用することが可能です。これはプロジェクトでの手動による初期セットアップが必要です。
プロジェクトをチェックインする前に、外部のバージョン管理システムにアセットを格納させるために、Unity のプロジェクト構造を少し変更する必要があります。これをするには、アプリケーションメニューで Edit->Project Settings->Editor を選択して Version Control のドロップダウンから Visible Meta Files を選択することで、外部のバージョン管理システムのサポートを有効化します。これにより Assets
フォルダーのすべてのアセットに対して、Unity で必要な管理情報のテキストファイルが作成されます。このファイルには .meta
拡張子がつけられ、関連するアセットのファイル名で名前が始まります。Unity での移動およびアセットのリネームが行われたとき、関連する .meta
ファイルの更新もし行います。しかし、外部ツールからアセットを移動またはリネームする場合、関連する .meta
も同期したことを確認してください。
プロジェクトをバージョン管理システムにチェックインするとき、システムに Assets
、UnityPackageManager
、ProjectSettings
のディレクトリを加えてください。Library
ディレクトリは、完全に無視されます。.meta ファイルを使用する場合は、それは、インポートしたアセットの単なるローカルキャッシュにすぎないからです。
アセットを新規に作成するとき、アセット自身と関連する .meta
ファイルがバージョン管理に追加されることを確認してください。
最初に svn://my.svn.server.com/
に Subversion リポジトリがあり、svn://my.svn.server.com/MyUnityProject
にプロジェクトを作成したいとします。
次の手順にしたがって、システムで初期インポートを作成してください。
InitialUnityProject
と名前をつけます。ここで初期アセットを追加または、後ほど追加することもできます。Library
ディレクトリを削除svn import -m"Initial project import" InitialUnityProject svn://my.svn.server.com/MyUnityProject
成功すると、プロジェクトは Subversion にインポートされ、InitialUnityProject
ディレクトリを削除しても問題ありません。svn co svn://my.svn.server.com/MyUnityProject
からチェックアウトし、Assets
、Packages
、ProjectSettings
ディレクトリがバージョン管理されていることを確認してくださいLibrary
ディレクトリが生成されます。Library
ディレクトリに対して無視( igonre )するフィルターを設定
svn propedit svn:ignore MyUnityProject/
Subversion がエディターを開くため、Library ディレクトリを追加します。svn ci -m"Finishing project import" MyUnityProject
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.