# Popup Text Unity Asset

- Link: https://saguiitay.com/unity/popup-text/
- Published: 2018-10-01T09:21:39+03:00
- Author: Itay

[Popup Text](https://assetstore.unity.com/packages/slug/129015?aid=1101lS3S) is 
a utility script that allows you to easily add pop up text to your games.

**Perfect for FPS and Survival games.**

One common theme of Survival and MMORPG games, is the need to notify the player 
that something happened. Be it that damage was inflicted to an enemy, or that the
player has picked up some resources. The most popular way to do so, is to temporarily
show the user a popup text. Sometimes, the text appears alongside an icon (such 
as an image representing the resource that was picked up). Almost always, the text
moves upwards and fades away after a few seconds.

Popup Text includes a script to handle pop up texts:

 * Supports TextMesh, Meshes and Images
 * Supports Text and Icon combination
 * Supports delayed and timed fade away
 * Supports force-facing text to (any) camera

The asset includes a sample scene with ongoing damage/heal/spell pop-ups, on-click
damage pop-ups, and pick up on-click popups.

**[Purchase Popup Text from the Unity Assets Store here >>](https://assetstore.unity.com/packages/slug/129015?aid=1101lS3S)**

## Screenshots

![Popup Text Screenshot 1](https://i0.wp.com/www.saguiitay.com/wp-content/uploads/
Popup-Text-Screenshot-1.png?ssl=1 "Popup Text Unity Asset 1")

![Popup Text Screenshot 2](https://i0.wp.com/www.saguiitay.com/wp-content/uploads/
Popup-Text-Screenshot-2-1024x647.jpg?ssl=1 "Popup Text Unity Asset 2")

![Popup Text Screenshot 3](https://i0.wp.com/www.saguiitay.com/wp-content/uploads/
Popup-Text-Screenshot-3-1024x536.jpg?ssl=1 "Popup Text Unity Asset 3")

## Documentation

### How to use Popup Text

#### Create your Prefab

Create a new game object, and assign it the Pop Up Script.

Configure the look-and-feel of the popup text:

 * If you plan to use only a simple text, add a TextMesh component, and set the 
   values for text/font/color/etc.
 * If you plan a combination of Text and Image, add 2 new child game objects:
    - One object for the text with a TextMesh component
 *  - A second object with the relevant Image component

![Popup Text Screenshot](https://i0.wp.com/saguiitay.com/wp-content/uploads/image-
15.png?resize=430%2C572&ssl=1 "Popup Text Unity Asset 4")

Configure the behavior of the popup text:

 1. If you’d like the popup text to be **automatically destroyed** after some time,
    enable the “Auto Destroy” feature and set the delay:
 2. If you’d like the popup text to **move**, enable the “Default Velocity” feature,
    and:
 3.  * **Add a Rigidbody component for the game object, and disable the “Use Gravity”
       option**
 4.  * Configure the direction and velocity you’d like the object to move
 5. If you’d like the popup text to **automatically fade away**, enable the “Auto Fade”
    option, and set the delay and duration of the fading.
 6. If you need the text to **face the camera**, check the “Face Camera” feature, and
    optionally set the camera (otherwise, the main Camera is used).

#### Configure emitting of Popup Text

Use one of the samples or write your own logic for emitting a popup text Prefab.
The sample project comes with 3 useful samples:

 * Ongoing emission – Emit popup text objects at a fixed rate
 * Emit on click – Simulating an enemy taking damage when attacked
 * Emit on pickup – Simulating a resource being picked up by the player
