NGUI Bark UI

NGUI Bark UI Component

To use NGUI in the Dialogue System, import the package Third Party Support ► NGUI Support.

The NGUI Bark UI component uses NGUI to display text above the NPC's head. Setting up NGUI barks requires two steps:

  1. NGUI requires a UI (e.g., "UI Root (2D)") to display anything. You must add one copy of the UI Bark Root component to a game object in an NGUI UI (Component → Pixel Crushers → Dialogue System → Third Party → NGUI → Bark Root). All barking NPCs will add their NGUI UILabels as children of this object. You only need one UI Bark Root, regardless of how many NPCs will use it.
  2. Add an NGUI Bark UI component to each NPC that will bark. Then set the Font. To customize the appearance, you can also set the color, effect, and scale of the text, or specify a template.

The NGUI Bark UI will attempt to place the label above the NPC's head based on the height of its CharacterController or CapsuleCollider. If the NPC has neither, or if you want to use a different position, you can set the Override Barker Transform property or create and use a label template. Add NGUIFollowTarget.cs to the label template and set Override Height.

You can also tick Include Name to include the barker's name in the bark text. Ticking Wait Until Sequence Ends will keep the bark text onscreen until the bark's associated cutscene sequence (if any) is over.

Check If Player Visible is ticked by default. When ticked, the barker runs a raycast to the main camera every frame that a bark is being displayed. If the raycast hits something, such as a wall, it hides the bark. If the raycast is clear, it shows the bark.

NGUI HUD Text Bark UI Component

An NGUI HUD Text version is available in the NGUI HUD Text package.

Check If Player Visible is ticked by default. When ticked, the barker runs a raycast to the main camera every frame that a bark is being displayed. If the raycast hits something, such as a wall, it hides the bark. If the raycast is clear, it shows the bark.


<< NGUI Support