Scripting for dynamic content

Now that your HUD has been completed, it is time to consider how the information on the HUD is updated. The following elements of our HUD require scripting so that they are dynamically updated during the game:

  • Cucumber Man's health
  • Number of Cucumber Man lives remaining
  • Points
  • Number of cherries in Cucumber Man's inventory
  • Number of cucumbers 
  • Number of Cucumber Beetles

In this section, we will lay the groundwork for updating the HUD information. 

Get Getting Started with Unity 2018 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.