Unity-Technologies / Unity-Technologies/UnityDataTools

Analyze command - track "SerializeReference" usage

オープン
#53 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
821
フォーク
71
平均マージ
3時間 13分
マージ済み PR(30日)
9

説明

The SerializeReference feature of Unity Serialization means that additional C# classes can be serialized directly inside MonoBehaviours and ScriptableObjects. They do not use MonoScripts to managed the C# type - instead the C# type info is serialized directly into the serialized reference registry of the MonoBehaviour. So the information about what types are actually used is spread all over the place in the built content.

Management of these objects can be a challenge, often we have to do text searching of the YAML format in the project assets to find them. In binary data its quite hard to "find" them without actually loading the content.

One example for wanting to find them is if you want to rename a class and need to confirm that the old name is not present anywhere in your assetbundles.

This feature idea is to add another table similar to the recently introduced mono_script table.

When we enumerate MonoBehaviour objects when we discover a SerializeReference instance we will add a row to the new table that has the assembly name, namespace and class, the riid, and the id of the MonoBehaviour. Ideally we would also capture the size of the serialized data for that object.

This code will automatically code ScriptableObjects because they are represented as MonoBehaviours in serialized data.

This implementation should be somewhat similar to how references are captured and recorded in the refs table, so it should be possible to implement in UnityDataTools without introducing any new concepts or complexity.

  • As part of this task also introduce one or more views that shows information from the new table, similar to the new script_object_view.
    E.g. a view that shows all SerializeReference objects with

monobehaviour object id, name, assetbundle/serialized fie, riid, size, Class, NameSpace, Assembly Name

  • Also update documentation to talk about the new table / view and use case for using it.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Analyze コマンドから始め、既存の mono_script テーブル、refs テーブル、script_object_view の実装を調査します。新しい SerializeReference テーブルと、要求された MonoBehaviour、object、asset、riid、size、class、namespace、assembly フィールドを対象とする 1 つ以上のビューを定義し、その後、テーブル、ビュー、クラス名変更のユースケースをドキュメントに追加します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
data, devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。