Customizing your exported project via the player settings

Now that we know what happens by default, let's take some time to customize the project to make it look as nice as possible. The PlayerSettings section is where we can define different parameters for each platform that we want to put the game onto. We perform the following steps:

  1. To open the player settings, you can either click on the Player Settings… button from the Build Settings menu or navigate to Edit | Project Settings | Player. Take a look at the following screenshot:
    Customizing your exported project via the player settings

    The player settings are actually shown in the Inspector tab. There are some key properties at the top, which are cross-platform, which means that they will apply to all platforms (or rather, that they will be the defaults that you can later override).

  2. Now, in the Example Code folder, you'll find a cursor_hand image. Drag and drop that image to the Assets/Sprites location of the project browser. Once there, select the image, and in the Inspector tab, change the Texture Type value to Cursor.
  3. Then, in the PlayerSettings section, drag and drop the cursor_hand image into the Default Cursor property and the playerShip image into the Default Icon property. Take a look at the following screenshot:
    Customizing your exported project via the player settings

    Note

    If you want your game to have multiple cursors or change cursors at runtime, the Cursor.SetCursor function will be quite helpful. For more information on this, check out http://docs.unity3d.com/ScriptReference/Cursor.SetCursor.html.

  4. On your computer, in the Example Code folder, move the ConfigBanner image into the Sprites folder. Then, under PlayerSettings, click on the Splash Image section to open the Config Dialog Banner property, which you should set to our newly imported image:
    Customizing your exported project via the player settings

    Note

    If you want to create a config dialog banner of your own, the maximum image size is 432 x 163 pixels. The image will not be scaled up to fit the screen selector. Instead, it will be centered and cropped.

  5. Next, you'll need to decide whether you want to display the display resolution dialog or not. If you want to keep it, skip this step. Otherwise, open up the Resolution and Presentation section, and under Standalone Player Options, set the Display Resolution Dialog value to Disabled.
  6. Having finished this, navigate to File | Save Project and build the game once more, overwriting the previously created one. Depending on your choice, you'll see the menu shown in the following screenshot:
    Customizing your exported project via the player settings

    Or just jump straight into the game.

The game already looks much better and more polished than earlier! There are a number of other things that you can do, such as restrict the kind of aspect ratios your game runs or resolutions, or force windowed, or full screen. I leave it to you to play around and get your project as nice as possible before moving onward!

Note

For more information on the properties for all the different platforms that are available, check out http://docs.unity3d.com/Manual/class-PlayerSettings.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset