Hi,
- I looked in the code of the FloatRegion attribute to try to understand. Before telling you what I found, just to give you context, FloatRegion and all the DevTools folder is a third party library. I don't own that code. So like you, I just use it to make my product, as you use Curvy to make yours. So after digging in the code, I found why the FloatRegion did not work for you: it is because the FloatRegion attribute needs a property in your code to retrieve options of the regions to display. In other words, you need to write this
As you can see, the TestRegionOptions property provides a RegionOptions. There you can make it return other options depending on your need.Code:[FloatRegion(UseSlider = true, RegionOptionsPropertyName = "TestRegionOptions", Precision = 4)]
public FloatRegion TestRegion = FloatRegion.ZeroOne;
RegionOptions<float> TestRegionOptions
{
get
{
return RegionOptions<float>.MinMax(0, 1);
}
}
This answer removed a hurdle from your path, but in my opinion you are following the wrong path, because ... - ... there is a way simple solution: use Unity's Range attribute. Check their doc for more
- The difference between ShapeExtrusion's Range and SplineController's Position is that they don't use the same property drawer. The latter uses RangeEx, an extension of the Range attribute, that allows for dynamic values
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.