You need to use "GetComponent", in doing so you won't need to cast.
http://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html
mySlider = GameObject.FindGameObjectWithTag("MySliderTag").GetComponent(UnityEngine.UI.Slider);
↧