using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SliderCol : MonoBehaviour { Slider slider; public float add; // Start is called before the first frame update void Start() { slider = GetComponentInParent(); } private void OnMouseDown() { slider.value += add; } }