JetBrains / JetBrains/resharper-unity
Add analysis for type passed to CustomPropertyDrawer
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
The `[CustomPropertyDrawer(typeof(...))]` attribute sets the target type of the property or decorator drawer class it is being assigned to. There are requirements for the target type, as well as the base class of the custom drawer. Unity will silently ignore if these are set incorrectly (this needs testing).
* The target type must be run time serialisable class, or a class that derives from `PropertyAttribute`. If not, the drawer does nothing. Testing is required to see if "serialisable class" means only types marked with `[Serializable]` or also `MonoBehaviuour` based types.
* If the target type is a serializable type, the drawer type must be a `PropertyDrawer`, and not a `DecoratorDrawer`.
Contributor guide
Research direction
Start at the Unity CustomPropertyDrawer attribute and investigate how its target type and drawer base class are currently handled. Add tests for serializable classes, PropertyAttribute targets, MonoBehaviour-based types, and the PropertyDrawer versus DecoratorDrawer requirements; done means invalid combinations are analyzed or explicitly covered by the tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100