Skip to content

Conversation

@JohannesDeml
Copy link
Contributor

@JohannesDeml JohannesDeml commented Jan 17, 2024

This way an inherited drawer will be used if it exists, which might not be too uncommon in the case of SerializeReference fields

Description

In the current implementation only CustomPropertyDrawers with an exact type match are used. However, the property drawer can also come from an interface or base class. This PR takes those into consideration.

Changes made

  • Check interfaces of type for a match of the found CustomPropertyDrawer
  • Check base classes of type for a match of the found CustomPropertyDrawer

…d interfaces

This way an inherited drawer will be used if it exists, which might not be too uncommon in the case of SerializeReference fields
@mackysoft mackysoft merged commit e5a5157 into mackysoft:main Feb 16, 2024
@JohannesDeml JohannesDeml deleted the bugfix/propertydrawer-allow-inheritance branch February 18, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants