Last issue I noticed is AddChild instantiates the prefab at localScale 1,1,1 so that was causing some issues. Is there a way to pass an additional parameter to prevent this or why is that the default? I would think a prefab text to 32,32,1 for a label would keep its size. The only way around would be to put the label on another GameObject in my prefab and then have to use scaling like .05,.05,1 which is less intuitive to me.
Right now I've had to create a public Vector3 TextSize {} and set it during runtime... not sure what kind of problems this might create later on though.
I considered HUDText.. funds a bit tight around Christmas right now ;P I'm just presenting labels on the screen... not tracking objects, but I'll probably end up buying it when we start dev of our TD.
Edit: Appears changing the label color during runtime makes the text not visible?
//flashy text to show worth of clicked gold
GameObject ftParent = NGUITools.AddChild(FloatingTextParent, FloatingTextObject);
FloatingText ft = ftParent.GetComponentInChildren<FloatingText>();
ft.Text = myPenaltyString.ToString();
ft
.TextSize = new Vector3
(32f,32f,1f
); ft.TextColor = ft.myTextColorRed;
Everything looks good in inspector, but commenting out ft.TextColor makes everything run fine while changing it makes it invisible unless I initiate a TweenAlpha.. then it suddenly shows up and fades.