Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fields not working with Unity editors drawn without IMGUI (ie 2022.3) #108

Open
GhatSmith opened this issue Oct 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@GhatSmith
Copy link

GhatSmith commented Oct 31, 2023

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, which would call RenderNewlyAddedFields (onGUIHandler).

@handzlikchris
Copy link
Owner

That makes sense, thanks for raising I'll check it out

@handzlikchris handzlikchris added the bug Something isn't working label Oct 31, 2023
@handzlikchris handzlikchris changed the title Added fields not working with Unity editors drawn without IMGUI Added fields not working with Unity editors drawn without IMGUI (ie 2022.3) Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants