how can i set the backgroung image on slider..?
or can i change attach material to slider and can change it on click..??
if the value of slider variable ==1 can set image 1,
and if value of slider variable==2 can set image 2 on slider..is it possible,..??
i hace done this till now.,it is changing image but on click it again not cnaginh back to previous image.
public GUISkin myskin;
private float sliderValue = 1.0f;
private float maxSliderValue = 2.0f;
public GUIStyle mystyle;
public GUIStyle mystyle1;
void OnGUI(){
GUI.skin=myskin;
GUILayout.BeginVertical ();
GUILayout.Box ("sliderValue : " + Mathf.RoundToInt(sliderValue));
sliderValue = GUI.HorizontalSlider(new Rect(10,50,200,50),sliderValue ,1.0f, maxSliderValue,mystyle1,mystyle1);
if (sliderValue == 1) {
sliderValue = GUI.HorizontalSlider(new Rect(10,50,200,50),sliderValue ,1.0f, maxSliderValue,mystyle,mystyle);
}
↧