Technical requirements
To get started:
- Download or clone the GitHub repository at https://github.com/PacktPublishing/C-Design-Patterns-with-Unity-First-Edition
- Open the Ch_14_Starter project folder in Unity Hub
- In Assets | Scenes, double-click on SampleScene
The starter project for this chapter is a simple character design screen, complete with sliders for adjusting initial health, magic power, and intelligence (because it’s always good to be smarter than the average orc). You also have UI buttons for saving your work and restoring the sliders to the default of previous configurations.
As for the scripts:
Character.cs
has variables forHP
,MP
, andINT
and aSetData
method for updating the class information from other classes.Client.cs
has references to the three Slider components that are already set up in the UI, and emptySave
andRestore
methods for us to fill out as we progress through the chapter example.SliderControl...