Setting up the Built in Health Bars and Name Text - Black-Horizon-Studios/Emerald-AI GitHub Wiki

Setting up the Built-in Health Bars and Name Text

Emerald AI features a built-in health bar and name text system. This allow an AI to have a health bar and name text displayed above them, when enabled. The health bar will react to any damage an AI receives. The color, size, and style of the text can also be customized with the markup format.

Step 1

Select your AI and go to the UI Settings tab.

Step 2

Set the following up according to your project.

  • Camera Tag (should be your Camera's tag)
  • UI Tag (should be your Player's tag),
  • UI Layers (should be your Player's layer)

Step 3

You can now choose to enable Auto Create Health Bars and/or Display AI Name. In doing so, you will enable further options for these settings. Adjust these as needed.

Note: An AI's name is taken from the AI Name variable located under AI's Settings>Stats tab.

Step 4

Test out your scene to ensure everything is working correctly. If not, double check your layer and tag settings have been setup correctly. Also, ensure that the health bars and/or name text settings have been enabled.

Step 5 (Optional)

Emerald AI's build-in name text also supports Markup formats which allow you to adjust the color, size, and styling of different portions of text. This can be done by including your Markup format within the AI's name. For example, if you want your AI's name text color to be yellow, you would do the following:

For more information, and a detailed guide on this feature, you can see Unity's official guide here: https://docs.unity3d.com/Packages/[email protected]/manual/StyledText.html