官术网_书友最值得收藏!

An introduction to build settings

There are times during development when you may want to see what your game looks like outside of the editor. It can give you a sense of accomplishment; I know, I felt that way the first time I pushed a build to a console devkit. Whether it's for PC, Mac, Linux, web player, mobile, or console, we have to go through the same menu – the Build Settings menu:

  1. Start off by opening up the project that we created in Chapter 1, Building Your Game. In addition, open the Scene we created (SampleScene.unity, which is inside the Scenes folder):
  1. Since the Scene is our gameplay, let's rename the file by right-clicking on the object in the Project window and selecting Rename. Rename the file Gameplay. Unity will ask whether you want to reload the Scene. Do so by clicking Reload.
  1. From here, we will open the Build Settings menu by selecting File | Build Settings:
You may alternatively press Ctrl + Shift + B or command + Shift + B to bring the menu up as well.

In the preceding screenshot, you will notice that the Build Settings menu came up. This menu contains three sections:

    • Scenes in Build: This window contains the scenes in our project that we want to include when we build our project. This ensures that things such as test levels won't be included unless you specify so.
    • Platform: This is a list of all of the platforms that you can export your game to. The Unity logo shows up on the current platform you're compiling for. In order to change your platform, you'll need to select it from this list and then click on the Switch Platform button, which appears below the list.
    • Options: To the right of the Platform section, you'll see some settings that can be tweaked based on how you want the build to work, with certain options that change based on the platform you will work with.
  1. By default, we have no scenes in our build, so let's go ahead and change that. Click on the Add Open Scenes button; you should see the Gameplay level appear in the list at index 0, which means that when your game is played, this level will be the first one to load:
You may also add scenes to the  Scenes in Build section by dragging and dropping them from the  Project window. You may also drag the scenes to reorder them however you wish.

Now that we know how the build settings work, let's see how to build the project for PC to understand the general case before continuing to build our mobile game.

主站蜘蛛池模板: 哈尔滨市| 巴青县| 通海县| 衢州市| 清水河县| 明光市| 柘荣县| 崇明县| 卓资县| 湾仔区| 忻城县| 双峰县| 夹江县| 昌乐县| 扎赉特旗| 梁平县| 黔西县| 枞阳县| 东宁县| 广河县| 上栗县| 龙南县| 错那县| 南召县| 吕梁市| 巴塘县| 开鲁县| 宁都县| 江永县| 绥宁县| 普格县| 城市| 弋阳县| 亳州市| 天全县| 临夏县| 黔南| 岳普湖县| 二手房| 平顺县| 体育|