Unity-Technologies / Unity-Technologies/UnityDataTools
Analyze command - track "SerializeReference" usage
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 821
- 派生
- 71
- 平均合并
- 3 小时 13 分钟
- 30 天内合并 PR
- 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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Analyze 命令开始,检查现有的 mono_script 表、refs 表和 script_object_view 实现。定义新的 SerializeReference 表,以及围绕所请求的 MonoBehaviour、object、asset、riid、size、class、namespace 和 assembly 字段的一个或多个视图,然后更新文档,加入该表、视图和类重命名用例。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, unity
- 领域
- data, devtools
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100