Hi
I would like to know if there is a possibility to add image to alert message in Alert Panel, for example:
- You acquired potion "x" (potion image)
- You acquired book "x" (book image)
"x" is number of acquired objects by player.
Adding images and variables to Alert Message
Re: Adding images and variables to Alert Message
Hi,
The easy way is to use TextMesh Pro (see TextMesh Pro Support) and <sprite> tags. You can also use [var=variable] markup tags in your alert text as well as \n for newlines. For example, you show a message like this:
You now have [var=numHealthPotions] health potions.\n<sprite name="health">
Alternatively, if you don't mind some programming, you can make a subclass of StandardDialogueUI and override the ShowAlert() method to show additional UI elements such as images.
The easy way is to use TextMesh Pro (see TextMesh Pro Support) and <sprite> tags. You can also use [var=variable] markup tags in your alert text as well as \n for newlines. For example, you show a message like this:
You now have [var=numHealthPotions] health potions.\n<sprite name="health">
Alternatively, if you don't mind some programming, you can make a subclass of StandardDialogueUI and override the ShowAlert() method to show additional UI elements such as images.