So I have been fiddling around with the editor a lot and made a cool mostly horizontal script for level editting simple layer based levels. For this I have sliders that control the height of the layered walls which can vary between 2f and 3f and can be any value in between, except I would like to limit this to go in steps of 0.1f.
Currently I have:
EditorGUI.Slider(new Rect(posLeft, pos.y, sliderWidth, rowHeight), rightScale, 2.0F, 3.0F, GUIContent.none);
I tried looking and ways to go around this by seperating the value shown and the slider but haven’t found anything that limits the stepsize of the slider. I know the ways to convert float values by either Rounding the value or using ToString(“0.#”) but as the slider decides what value is shown I can’t manipulate it later in the editor script.