Unity-Technologies / Unity-Technologies/UnityDataTools

Analyze command - track "SerializeReference" usage

Abierto
#53 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
C#
Estrellas
821
Forks
71
Merge medio
3 h 13 min
PR fusionados (30 d)
9

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el comando Analyze e inspecciona las implementaciones existentes de las tablas mono_script y refs, y de script_object_view. Define la nueva tabla SerializeReference y una o más vistas para los campos solicitados de MonoBehaviour, object, asset, riid, size, class, namespace y assembly; después, actualiza la documentación con la tabla, la vista y el caso de uso del cambio de nombre de clases.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, unity
Área
data, devtools
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.