YAML Asset Browser
An editor extension for browse YAML formatted asset of Unity. You can check asset contents comparing with YAML formatted text.
in Japanese: Unity の YAML 形式のアセットを閲覧するエディタ拡張。 YAML 形式のテキストと比較しながらアセットの内容を確認できる。
- Download released package / リリース パッケージ ダウンロード
- README english
- README 日本語
- Bug report / 不具合などはこちらへ
- Latest development version on GitHub
README (English)
Open asset file
1: Your project has to use "Force Text" asset serialization setup
- If you are not sure, check Unity menu > Edit > Project Settings > Editor Settings > Asset Serialization.
- (Reference: EditorManager in Unity manual )
2: Open YAML Asset Browser window from Unity menu
- Unity menu > Window > VRC_Iwsd > Yaml Asset Browser
- 3: Select an asset object in Project window as usual Unity operation
- 4: Press "Load" button on toolbar of YAML Asset Browser
- Then you'll see the tree structure and YAML text of the asset
- You can also drag and drop resource file to asset path field
- If you select a prefab instance in Hierarchy window, YAML Asset Browser loads that prefab
- If selected object is not related asset, nothing will happen.
- YAML Asset Browser loads asset file independently from Unity editor. So editing asset doesn't affect to YAML Asset Browser view. To update, you have to reload manually.
- Each time you select menu, new window will be shown up.
- Each window does loading independently
Browse
- Tree view shows asset structure
- For scene file, you can browse not only GameObject hierarchy but also non-component objects (e.g. LightmapSettings, RenderSettings)
- TODO: Prefab instances in scene file are not well located in the tree. They are placed in "Others" folder temporarily.
- TODO: build better hierarchy for animation controller
- Each tree item has "line xxx" text. This is line number of where the item comes in YAML formatted asset file.
- If click tree item, then YAML text scrolls to that line
- Search text input field on toolbar filters tree item by its text matching
Search
- Search by fileID (Local Identifier in file)
- Search by GUID
- Input GUID value to search reference target to another asset
- Search by fileID and GUID
- Input fileID and GUID to search reference target in another asset
- query string format is like "fildID:xxxx guid:xxxx". Extra characters will just be ignored.
Supported file type and extensions
YAML Asset Browser checks file extension to determine whether it's readable or not. Here's readable asset file type and its extensions.
- prefab (.prefab)
- scene (.unity)
- animation controller (.controller)
- animation (.anim)
- material (.mat)
- render texture (.renderTexture)
- scriptable object (.asset)
- You have to drag and drop to load for this type
Known issues
- Prefab instances (in scene file) are not appears in GameObject hierarchy tree.
- Stripped prefab in scene file is not handled well
- (Stripped prefab seems relate to delete child element from prefab. I have to investigate more.)
README (日本語)
アセットファイルを開く
- 1: プロジェクトの「asset serialization」の設定が「Force Text」になっている必要がある
- Unity メニュー > Edit > Project Settings > Editor Settings > Asset Serialization で確認
- (参考: EditorManager Unity マニュアル )
- 2: Unity メニュー から YAML Asset Browser のウィンドウを開く
- メニュー > Window > VRC_Iwsd > Yaml Asset Browser
- 3: 通常の Unity 操作と同じように、Project ウィンドウでアセットを選択する
- 4: YAML Asset Browser のツールバーにある "Load" ボタンを押す
- リソースファイルを、アセットパス(path)欄にドロップしてもよい
- Hierarchy ウィンドウでプレハブのインスタンスを選択すると、そのプレハブをロードする
- 選択したオブジェクトがアセットに関連づいていない場合は何も起きない
- YAML Asset Browser は Unity エディタとは独立してアセットファイルを読み込む。 このためアセットを編集しても YAML Asset Browser のビューには反映されない。 更新するには手動で再度ロードする必要がある。
- メニューを選択するたびに新しいウィンドウが表示される。
- それぞれのウィンドウは独立してロードを行う
閲覧する
- ツリーはアセットの構造を表示する
- ツリー中のそれぞれのアイテムには "line xxx" のような表示がされる。これはその要素が YAML 形式のアセットファイルのどの行から来たのかを表示している
- アイテムをクリックすると、YAML テキストがその行を表示するようにスクロールする
- ツールバー上の入力欄は、テキスト一致でツリー表示をフィルターする
検索する
- fileID での検索 (Local Identifier in file)
- アセット中の要素を検索するには "fileID" を入力する
- 検索結果はすぐ下のテキストエリアに表示される
- "and select it" トグルをオンにしておくと、見つかった要素をツリー中で選択する
- (ヒント:YAML テキストをダブルクリックすることで fileID の値を選択し、コンテキストメニューからコピーできる。(次のキャプチャで緑の部分))
- GUID での検索
- 他のアセットの参照を検索するには GUID 値を入力する
- fileID と GUID での検索
- 他のアセット中の要素の参照を検索するには fileID と GUID を入力する
- 検索文字列のフォーマットは "fildID:xxxx guid:xxxx" のようにする。余分な文字は無視される。
対応ファイル種と拡張子
YAML Asset Browser は拡張子を検査して、読み込めるかどうかを判断している。 以下が対応しているアセットの種類と拡張子である。
- prefab (.prefab)
- scene (.unity)
- animation controller (.controller)
- animation (.anim)
- material (.mat)
- render texture (.renderTexture)
- scriptable object (.asset)
- これをロードするにはドラッグ&ドロップの方法を使うこと
既知の問題
- シーンファイル中のプレハブ・インスタンスが、ツリー上で適切な場所に配置されない
- シーン中の「Stripped prefab」は上手く扱えていない
- (「Stripped prefab」はプレハブから子要素を削除することに関係している模様。要調査。)