Unity Learn home
View Tutorial Content

Add a food resource

Tutorial
Beginner
+0 XP
15 Mins
(181)
Overview
Summary
Now the game can count turns, you can start introducing gameplay elements like resource management.
By the end of this tutorial, you’ll have done the following:
  • Added a food resource that will spawn randomly on the game board at start and that the player character can collect.
  • Used the UI Builder window to create an in game label that shows the amount of food the player currently has.
  • Coded the functionality to have the food resource decrease with each turn of the game and increase every time the player character collects a food resource.
Select your Unity version
Last updated: October 10, 2024
6
Language
English
Also included in
Add a food resource