The main menu UI will be its own Canvas GameObject. We will then handle the main menu and the game UI via the GameInfo
class. We will also use the GameInfo
class to manage button presses and the iOS integration.
In Hierarchy, right-click and select UI and then click on Canvas. Name this new Canvas GameObject MenuUI
.
Let's start by adding five buttons to achievements, playing, leaderboards, remove iAds, and restore purchase.
Right-click on the new MenuUI GameObject, navigate to UI, and left-click on Button. Do this four more times, so there are a total of five buttons that are children of the Menu UI GameObject.
Name the buttons and text children as follows:
PlayButton
,PlayText
LeaderboardButton
,LeaderboardText
AchievementButton
,AchievementText
RemoveAdsButton
,RemoveAdsText
RestorePurchaseButton
,RestorePurchaseText