DeuS
1
So in enemy script(instantiate object) i have variable “public UISlider healthSlider”.
How to attach to this variable a existing NGUI element?
As i know “find” doesn’t work in this situation, like this:
healthSlider = GameObject.FindWithTag(“Enemy Health Bar”);
DeuS
2
i’m so stupid:P
healthSlider = GameObject.FindWithTag("Enemy Health Bar").GetComponent<UISlider>();