handzlikchris / handzlikchris/FastScriptReload
Added fields not working with Unity editors drawn without IMGUI (ie 2022.3)
- Lenguaje dominante
- C#
- Estrellas
- 2.2k
- Forks
- 167
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
On recent Unity versions (tested with v2022.3.10f1 on my side), Unity is no longer drawing default inspector with IMGUI (but with Visual Elements). Making the added fields feature no longer working.
This can be verified by enabling "Use IMGUI Default Inspector" in the Project Settings > Editor.
When enabled added fields feature is working again.
When disabled, as Unity is no longer calling DrawDefaultInspector, the harmony patch is no longer effective, and RenderNewlyAddedFields is no longer called.
I guess an additional patch would be needed in NewFieldsRendererDefaultEditorPatch constructor to add compatibility with the new way Unity is drawing inspectors. Probably by adding a patch to CreateInspectorGUI, where you could add the creation of a new [IMGUIContainer](https://docs.unity3d.com/ScriptReference/UIElements.IMGUIContainer-ctor.html), which would call RenderNewlyAddedFields (onGUIHandler).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comience con el constructor NewFieldsRendererDefaultEditorPatch y siga cómo DrawDefaultInspector conduce actualmente a RenderNewlyAddedFields. Reproduzca el comportamiento en Unity 2022.3 con Use IMGUI Default Inspector habilitado y deshabilitado, y después inspeccione la integración de CreateInspectorGUI y IMGUIContainer. Se considera terminado cuando los campos añadidos se renderizan cuando Unity usa el inspector de Visual Elements, mientras el comportamiento IMGUI existente sigue funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, unity
- Área
- game-dev, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100