Modifying the value of a serialized field which is also decorated with the MinAttribute or the PMinAttribute in the inspector causes it to reset to whatever value is assigned in the respective Min or PMin attribute constructor.
Steps to reproduce
Open any Unity project
Create a custom MonoBehaviour object
Add a private int field and give it any name
Decorate the field above with either the MinAttribute or the PMinAttribute, specifying any positive value as the attribute's constructor parameter
Add this custom MonoBehaviour to any GameObject in the scene
In the Power Inspector window, attempt to modify the value of the serialized field from step 3 (using the text-box, not the drag-control)
Move focus to a different control and observe
Expected and Actual Results
It is expected that inserting a value into the serialized field via the text-box will actually apply the user-specified value. What actually happens is the value is immediately overridden with whatever value was specified within the constructor of the Min or PMin attribute.
Additional Information
Running Unity 2019.3.0f5 with Power Inspector 1.3.2
Modifying the value of a serialized field which is also decorated with the
MinAttribute
or thePMinAttribute
in the inspector causes it to reset to whatever value is assigned in the respectiveMin
orPMin
attribute constructor.Steps to reproduce
MonoBehaviour
objectprivate int
field and give it any nameMinAttribute
or thePMinAttribute
, specifying any positive value as the attribute's constructor parameterMonoBehaviour
to anyGameObject
in the sceneExpected and Actual Results
It is expected that inserting a value into the serialized field via the text-box will actually apply the user-specified value. What actually happens is the value is immediately overridden with whatever value was specified within the constructor of the
Min
orPMin
attribute.Additional Information
Running Unity 2019.3.0f5 with Power Inspector 1.3.2