24
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Library/metadataの細々したファイルがコミット時ウザい件

24
Last updated at Posted at 2014-08-23

「バージョン管理するのはAssetsとProjectSettingsだけでOK」という話をよく聞くものの、実際やってみてうまくいかなかったので仕方なくLibraryやPackagesもバージョン管理していました。

最近、Libraryを捨てるためには設定が必要というのを知りました。

inspector.png

  1. メニューで [Edit(Macの場合はUnity)] → [Project Settings] → [Editor] を選択
  2. インスペクタが開くので、設定パネルで Version Control Mode を Visible Meta Files に設定
  3. Asset Serialization Mode を Force Text に設定
  4. プロジェクトを保存

これでLibrary以下のファイルをバージョン管理する必要がなくなり、AssetsとProjectSettingsだけで大丈夫になりました。

4.5.2f1で確認しましたが、5.0.0f4でも同様の手順でいいようです。

これでmedadataはこれでちまちまコミットせずにすむようになりましたが、*.metaファイルは残ります。*.metaには設定の一部が保存されているようなので、これらはバージョン管理しておいたほうがいいようです。

Unityのバージョンによる細かい違い

バージョン管理するためのコツはUnityの更新のたびに細かく変わってきたようです。上の手順は4.5.2f1で確認したものです。

4.3.4以前は、Version Control Mode を Hidden Meta Files に設定したままで大丈夫だったそうです。

4.3以前は、Version Control Mode の選択項目は Disabled や Meta Files といった名前だったそうです。

4.5以前は、 Unity or Edit → Preferences → Packages → Repository を Externalに設定する必要があったそうです。

参考記事

24
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?