Change the value of a slider when pressing a UI Button

Using C sharp, how would one go about changing the value of a slider set from 0-0.75 using a UI button. Using increments of 0.1 each time the button is pressed. I have been battling this question for 2 days trying to understand how a button and a slider can interact with each other. So, any ideas are very much appreciated!

Add ButtonClick Event in Button

void OnButtonClicked(){
slider.value += 0.1f;
}

make sure your sliders min value is 0 and max value is 0.75

  1. Use UnityEngine.UI Name space

  2. Then Create Slider Variable public Slider ui;
    Assign Script to ui button ,

  3. Drag and Drop your Slider object from canvas to that public field inside script (Hoping that you know basic concepts of unity as well)

  4. Then Create Button variable like you did for Slider public Button yourButton;and Create Click Event. If don’t know then go here https://docs.unity3d.com/ScriptReference/UI.Button-onClick.html

  5. And instead for Printing something just increment slider.value with desired value . https://docs.unity3d.com/ScriptReference/UI.Slider-value.html