130 likes | 149 Views
Unity Game Development. UI, XML, Localization, Scene Load & Build .exe. Class overview. Class 7 Revision Main Menu Button OnClicked Logic XML Data Localization Data Localization Code Building . exe Loading scenes & Quitting Advanced: UI selection Advanced: Options menu. Revision.
E N D
Unity Game Development UI, XML, Localization, Scene Load & Build .exe
Class overview • Class 7 Revision • Main Menu • Button OnClickedLogic • XML Data • Localization Data • Localization Code • Building .exe • Loading scenes & Quitting • Advanced: UI selection • Advanced: Options menu
Revision • Project Settings - Input • Setting up Keyboard & Xbox Controller Input • Creating 2 Players • Shooting a Fireball • Particle Emitter • Events & Delegates
Main Menu • Create Scene • Add Canvas • Add 4x Text • Add 3x Button • Setup anchor alignment • Setup Hover & Select Color • Setup font • Implement OnClicked code
Button onclicked Logic • OnClicked can call functions on any object
XML Data • XML stands for eXtensibleMarkup Language. • XML is a markup language much like HTML. • XML was designed to store and transport data. • XML was designed to be self-descriptive. • XML is a W3C Recommendation.
Localization data • Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale).
Localization code • Create LocalizationManager Singleton • Create enum of available Languages • Load Localization files from Resources Folder • Create Dictionary of Key and Value from XML • Retrieve Localized string from Data
Building .exe • File > Build Settings… • Setup Scenes in “Scenes in Build” • Open each scene and click “Add Open Scenes” • Select Build and choose Build Folder Location
Loading Scenes & Quitting • Use SceneManager to Load Scenes • Application.Quit() to shutdown game
Advanced: UI selection • Implement Controller & Keyboard keys support • Add cooldown & keep track of selection • Base Index Max on amount of Buttons in Menu • Clamp Index values so Buttons are valid • Call “Select” on Selected Button • Set cooldown between each selection update
Advanced: Options Menu • Add UIManager Singleton • Add every UI State to UIManager • Create new GameObject called OptionsMenu • Populate with UI text & button entries
Q&A • Do you have any questions related to the topics mentioned?