slider in unity inspector code example
Example 1: Unity C# add slider into editor
[Range(min,max)]
Example 2: create a slider in the inspector C#
[Range(0.0f, 10.0f)]
public float mySliderFloat;
[Range(min,max)]
[Range(0.0f, 10.0f)]
public float mySliderFloat;