Search Unity

Slider - disable OnValueChange event

Discussion in 'Scripting' started by ThySpektre, Aug 20, 2019.

  1. ThySpektre

    ThySpektre

    Joined:
    Mar 15, 2016
    Posts:
    362
    Is it possible to fire the OnValueChanged event for the slider only when its value is modified by the use and not programatically?
     
  2. _met44

    _met44

    Joined:
    Jun 1, 2013
    Posts:
    633
    Yes, use slider.SetValueWithoutNotify() instead of slider.Value when you want to set the value without firing the event !
     
    Last edited: Nov 12, 2021