Feature Request: New attribute MinMaxSlider for int values

Issue #288 resolved
Former user created an issue


It would be great if we can inject two "int" properties into the MinMaxSlider and be able to snap the slider values with a min "int" and a max "int".

Comments (5)

  1. mSkull001

    We'll be able to do this with the release with version 1.1. For now, you can do something like this:

    [SerializeField, HideInInspector]
    private int min;
    [SerializeField, HideInInspector]
    private int max;
    [ShowInInspector, MinMaxSlider(0, 10)]
    private Vector2 MinMax
            return new Vector2(min, max);
            this.min = value.x;
            this.max = value.y;
  2. Miha Krajnc

    I would like to see this aswell.

    My suggestion is to use UnityEngine.Vector2Int if that's not already supported with 1.1 release.

  3. Log in to comment