Author Topic: NGUI: HUD Text  (Read 529329 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #105 on: August 03, 2013, 02:41:42 PM »
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.

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: NGUI: HUD Text
« Reply #106 on: August 05, 2013, 05:01:49 AM »
Remove the () from scaleCurve.

Damn, simple mistake, but not sure why I didn't realize that.  Thanks for the help.  Got everything looking great.  :)

ds_2051

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: NGUI: HUD Text
« Reply #107 on: August 15, 2013, 02:44:42 AM »
Hi

how i can add offset value so that Hudtext appear/follow on the specific point.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #108 on: August 15, 2013, 06:56:35 AM »
GameObject (UIFollowTarget)
- Offset GameObject (HUDText)

miacoviello

  • Guest
NGUI HUD - Dynamic Objects on an existing scene
« Reply #109 on: August 18, 2013, 12:23:54 AM »
Hi can you provide some short instructions how to use NGUI HUD in an existing scene with dynamic game objects?

We have a game where we dynamically create game objects, I've followed the tutorials and for some reason I believe the text is appearing but is very skewed.  If you can provide a quick bullet point instructions to get this going properly with NGUI full version and NGUI HUD it would be appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #110 on: August 18, 2013, 06:16:54 AM »
Pictures would help. "very skewed" doesn't tell me much. As long as UIFollowTarget+HUDText scripts are in your UI hierarchy, it'll work as expected.

miacoviello

  • Guest
Re: NGUI: HUD Text
« Reply #111 on: August 18, 2013, 07:39:43 AM »
Hi,
please see the skewed text image.  This pops up at the side of the screen when text is expected to appear.. it seems to be the text as it is animated when disappearing.  The hierarchy shows the project, there are 32 of these created in code.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #112 on: August 18, 2013, 07:53:05 AM »
Your "HUD" needs to be under a center-based UIAnchor.

Your first picture just shows some blue rect inside a black rect. Not sure what it's supposed to be?

miacoviello

  • Guest
Re: NGUI: HUD Text
« Reply #113 on: August 18, 2013, 08:04:12 AM »
Hi, the blue rectangle is what I'm talking about.  That is what is popping up at the left of the screen when the text should be appearing above the object.  Any ideas would help, I've updated the project to place the HUD under the anchor but still have the same results (new attachment).  Any ideas or a short bullet point of how to lay this out or code steps would be good.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #114 on: August 18, 2013, 08:26:53 AM »
The steps are in the readme:

1. Attach the HUDText script to a game object underneath your UIRoot and set the font it should use.
2. To make it follow an object drawn with another camera, attach UIFollowTarget to the same object and set its target.
3. From code, use HUDText's Add() function to add new floating text entries.

Easiest way to see what's happening is to switch to your Scene View tab. Game window is not very useful.

miacoviello

  • Guest
Re: NGUI: HUD Text
« Reply #115 on: August 18, 2013, 11:09:51 AM »
Good tip with the scene window, it seems it is zoomed in very close.. let me try a few things.  Thanks.

Cizia

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: NGUI: HUD Text
« Reply #116 on: August 22, 2013, 03:28:28 AM »
Hi,

First I have to say that I'm the owner of NGUI and HUD Test and I love your work, came lately to your stuff but allowing me to understand how usefull is your work.

I would suggest for HUD text a parameter allowing bold or bigger text, for special hit per example.

Only thing I would say I am missing about your stuff :-)

Regards

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI: HUD Text
« Reply #117 on: August 22, 2013, 09:27:12 AM »
I would suggest creating a second HUDText for that that's using a bigger / bold font. For regular hits use the original one, and for crits use the bigger one.

Cizia

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: NGUI: HUD Text
« Reply #118 on: August 22, 2013, 09:29:08 AM »
Aren,

As simple as that, thanks for your answer I will implement it.

Regards,

Cizia

darthviper107

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: NGUI: HUD Text
« Reply #119 on: September 04, 2013, 05:53:20 PM »
Hey, I'm trying to use the UIFollowTarget to make a button position itself above an object but it doesn't seem to work

Here's my hierarchy:

Cube
Main Camera
>UI Root(2D)
     >Anchor
          >Panel
               >Button
And then the UIFollowTarget script is applied to that with the cube as the target, but it's not working, the button just disappears. Am I doing something wrong?