- marked as trivial
OdinAttributeDrawer: no suitable method found to override
Issue #754
resolved
Unity version: Unity 2021.1.0b6.1892
What happen: A compilation error occurs when copy pasting the example from the documentation.
How to reproduce it:
- Create an empty project
- Just copy paste the code from here: https://odininspector.com/documentation/sirenix.odininspector.editor.odinattributedrawer-1
Same error on Odin 3.0.1
Comments (3)
-
-
The error message does indicate that the DrawPropertyLayout method inside your CustomRangeAttributeDrawer is not like the example you’ve linked. Please review your code and make sure that your CustomRangeAttributeDrawer looks like this:
protected override void DrawPropertyLayout(GUIContent label) { this.ValueEntry.SmartValue = EditorGUILayout.Slider( label, this.ValueEntry.SmartValue, this.Attribute.Min, this.Attribute.Max); }
In particular look at the parameters of the DrawPropertyLayout function and make sure they’re the same.
Let me know if that resolved your issue. -
- changed status to resolved
The documentation has been updated for a while now to reflect the correct method to override, I believe.
- Log in to comment