Hey guys.
onStart i want the slider to be invisible. However using slider.enabled = false just disables the functionality of the slider rather than the actual drawing.
Any thoughts ?
Hey guys.
onStart i want the slider to be invisible. However using slider.enabled = false just disables the functionality of the slider rather than the actual drawing.
Any thoughts ?
I think you need to use SetActive(false);
Slider mySlider;
void Start()
{
mySlider = GameObject.Find("mySlider").GetComponent<Slider>();
mySlider.gameObject.SetActive(false);
}
if you have a button to activate and deactivate it, you can do
if (mySlider.gameObject.activeSelf)
{
mySlider.gameObject.SetActive(false);
}
else
{
mySlider.gameObject.SetActive(true);
}