Delete LookAtTarget from HUDText (or dont import it). I'll fix it in the next update -- it seems the metadata changed.
You need to use NGUITools.AddChild to instantiate UI-related components, providing a valid game object as parent. This game object needs to be in the UI hierarchy. You can't just create a random game object in the middle of nowhere and expect it to work properly with the UI.
Look at how I use HUDRoot.
You never set the uiCamera property of UIFollowTarget, so it may be finding the wrong one. When you select the instantiated object, where does it appear to be?
Some issues I see with your setup:
- I don't see a UIRoot or UIAnchor. Your hierarchy seems to not follow NGUI's default UI setup.
- Your instantiated object is not parented to the UI camera.
- I can't see the transform so I don't know what the values there like... however without a UIRoot I imagine they text ends up being huge. Zoom out.
One of the most common questions I get is how to add more than just text to the HUD UIs created with HUDText.
Well... here's a video!
http://www.youtube.com/watch?v=idVr8-jfdAI
Oh please add this video Link to the Unity Store, your Unity Forums Post (at the top in your intro) and on this Forum board at the top in your Intro. Also please add a description above the Links (like HUDText Tutorial, HUDText Health Bars). I just found this after reading through this entire post when this is all I was looking for :)It's actually linked in the original post under "videos" section.
Remove the () from scaleCurve.
:(
I have an issue regarding HUDText, I just updated NGUI to 3.0.1 and hudtext suddenly borked on me.. the issue is that the font is all blown out.. heres a screenshot
Update: I've fiddled on the issue, and my current work around is settings its scale lower than usual, the defaul is 1, and set it to around .1 or so, kinda weird that it appeared normally before the update
Hi there,
just wondering: are there any plans to incorporate direct TTF fonts usage in Hud Text as you did in NGUI 3.0?
Thanks.
Without your project to look at, all I can say is check to see how it differs from the example scenes that come with HUDText (example two in particular).
HUDText's labels are also set to "resize freely", meaning they have no width or height, so there is nothing that would cause them to start a new line unless you've changed this behaviour. You can check this by pausing the game and selecting one of HUDText's labels.
Scrolling up also occurs just fine in the 2nd example.
Yup. Just use the standard color encoding like so: "[ff0000]Red[-] and [00ff00]Green[-]".
It doesn't do raycasting. If you want it hidden, I suggest you perform a raycast periodically (toward the camera) and if something is hit, hide the HUD element.
Error while importing package: Couldn't decompress package
UnityEditor.AssetStoreContext:OpenPackage(String, String)
I don't think I've ever seen that error. Looks like something in Unity. I suggest trying to restart it, and making sure that your Unity version is up to date.I did.
where are download link??