basically what the title says.
Read only in what sense? The slider displays the current value, but cannot be adjusted? Or the slider “snaps” to a mid point and can be adjusted as an offset of that midpoint?
If “vSliderValue = GUI.VerticalSlider (Rect (25, 25, 100, 30), vSliderValue, 10.0, 0.0);” is a read/write slider, then simply removing the vSliderValue = like this…
GUI.VerticalSlider (Rect (25, 25, 100, 30), vSliderValue, 10.0, 0.0);
Would be a “read only” slider in the sense that it displays the proper value but does not “slide” (the user cannot change).
Doing a snap slider would be a little more difficult; basically you’d have to detect when the mouse started interacting with the slider and when it stopped. Whenever you have a mouse up event over the slider you’d reset the min/max/midpoint values.
never mind, I figure it out. i used : GUI.enabled = false;
In your slider object, uncheck interactable