08 Combatant Prefabs, Icons & Portraits

In this tutorial we’ll add prefabs, icons and portraits for our combatants.

We’ve already added a prefab for our (initial) player combatant, the Warrior. Now, it’s time to add prefabs to the rest of our combatants, as well as add icons and portraits to them (and the warrior).

0: Warrior #

Let’s start with our player and add the icon and portrait, since we already added the prefab earlier.

Content Information #

  • Sprite (Icon)
    Select icons_combatants_0.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

UI Settings > Portraits #

Portraits can be used in dialogues, menus and HUDs. You can use different portrait types to show different content, e.g. happy or sad portraits.

We’ll only use the Default portrait type that’s already set up as a, well, default for now.

Combatants can use different sets of portraits – the combatant will randomly select a portrait set when being initialized in the game. This can be useful if you use randomized combatants. For our setup we’ll just use one portrait set.

Click on Add Portrait Set.

Click on Add Portrait.

  • Portrait Type
    Select Default.
  • Sprite
    Select portrait_warrior.

1: Rogue #

The rogue is another player combatant. This time we’ll also add a prefab.

Content Information #

  • Sprite (Icon)
    Select icons_combatants_1.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Base Settings > Prefab Settings #

  • Prefab
    Select Rogue.

UI Settings > Portraits #

Click on Add Portrait Set.

Click on Add Portrait.

  • Portrait Type
    Select Default.
  • Sprite
    Select portrait_rogue.

2: Ranger #

And another player combatant – you probably remember already how to do this.

Content Information #

  • Sprite (Icon)
    Select icons_combatants_2.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Base Settings > Prefab Settings #

  • Prefab
    Select Ranger.

UI Settings > Portraits #

Click on Add Portrait Set.

Click on Add Portrait.

  • Portrait Type
    Select Default.
  • Sprite
    Select portrait_ranger.

3: Wizard #

I’ll only show a compact version of the setup from now on – Icon will define the used icon sprite (Content Information), Prefab the used prefab (Base Settings > Prefab Settings) and Portrait the used portrait sprite (UI > Portraits after adding a portrait set and a portrait and selecting the portrait type Normal).

  • Icon
    Select icons_combatants_3.
  • Prefab
    Select Wizard.
  • Portrait
    Select portrait_wizard.

4: Cleric #

  • Icon
    Select icons_combatants_4.
  • Prefab
    Select Cleric.
  • Portrait
    Select portrait_cleric.

5: Monk #

  • Icon
    Select icons_combatants_5.
  • Prefab
    Select Monk.
  • Portrait
    Select portrait_monk.

6: Rat #

  • Icon
    Select icons_combatants_10.
  • Prefab
    Select Rat.
  • Portrait
    Select portrait_rat.

7: Wasp #

  • Icon
    Select icons_combatants_15.
  • Prefab
    Select Wasp.
  • Portrait
    Select portrait_wasp.

8: Snake #

  • Icon
    Select icons_combatants_13.
  • Prefab
    Select Snake.
  • Portrait
    Select portrait_snake.

9: Angry Snake #

  • Icon
    Select icons_combatants_6.
  • Prefab
    Select Snake_angry.
  • Portrait
    Select portrait_angry_snake.

10: Skeleton #

  • Icon
    Select icons_combatants_11.
  • Prefab
    Select Skeleton.
  • Portrait
    Select portrait_skeleton.

11: Bat #

  • Icon
    Select icons_combatants_7.
  • Prefab
    Select Bat.
  • Portrait
    Select portrait_bat.

12: Slime #

  • Icon
    Select icons_combatants_12.
  • Prefab
    Select Slime.
  • Portrait
    Select portrait_slime.

13: Frog #

  • Icon
    Select icons_combatants_9.
  • Prefab
    Select Frog.
  • Portrait
    Select portrait_frog.

14: Spider #

  • Icon
    Select icons_combatants_14.
  • Prefab
    Select Spider.
  • Portrait
    Select portrait_spider.

15: Dragon #

  • Icon
    Select icons_combatants_8.
  • Prefab
    Select Dragon.
  • Portrait
    Select portrait_dragon.

16: Velociraptor #

  • Icon
    Select icons_combatants_21.
  • Prefab
    Select Velociraptor.
  • Portrait
    Select portrait_velociraptor.

Save Changes #

And that’s it!

Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Next, we’ll set up the remaining animations for our combatants.