The first thing we need to do is create a background for the main menu of our game. This will give us a chance to see how to setup Unity GUI components. To keep things simple, initially we will start with the main menu.
On top of this we will display the buttons for our game. While it is possible for us to modify our existing GameIntro scene to handle a main menu, it is better from a design perspective to create a standalone scene for the main menu. This will aid the development workflow as content creators can work on this scene in isolation.
PlayIntroMovie
script to have it load the MainMenu scene instead of just dropping directly into the game.using UnityEngine;
using System.Collections;
public class PlayIntroMovie : MonoBehaviour {
// Use this for initialization
IEnumerator Start () {
iPhoneUtils.PlayMovie("Snowpocalypse2011.m4v", Color.black, iPhoneMovieControlMode.CancelOnTouch, iPhoneMovieScalingMode.AspectFill );
yield return null;
Application.LoadLevel("MainMenu");
}
}
army_camo.jpg
. If you drag this into Unity it will be imported and ready for use. However, there are a few settings we want to change for our iOS release. If you display the Inspector settings for the asset you will find that it is imported at 1024x1024. However, for our iOS game, we don't want such a large texture simply as a background.
Now our texture for iOS will only be 512x512, while it can be 1024x1024 for other platforms. From a workflow perspective this is important, as you will want to override your assets for the platform you're deploying to, while not creating entirely new assets for each platform.
3.145.37.126