Mastering Unity 2D Game Development(Second Edition)
上QQ阅读APP看书,第一时间看更新

Creating the project

Before you can start building the game in Unity, you need to start a new project. Select New at the top of Unity's Home Screen. When creating a 2D game, you want to ensure that you start the project in 2D mode by selecting the appropriate mode in the Unity's home screen, as shown in the following screenshot:

Unity's home screen

Note

Remember, if you accidentally set the mode to 3D, you can change this at any time for your project through Editor Settings, as discussed in the previous chapter.

After selecting Create project, you'll be brought to the Editor Window, as shown in the following screenshot:

Unity's Editor window

It's important to note that when you create a new project in Unity, you are creating a new folder that can be accessed through File Explorer (Windows) or the Finder (Mac OS X) with the following subfolders:

Now that we have created our project, let's create the folder structure for the project, as shown in the following screenshot and discussed previously:

To create a new folder from within Unity, simply select Create | Folder from the project tab in the bottom left corner of the screen:

When creating folders from within Unity, they will be represented within the Assets folder saved to your computer. Alternatively, if you create the folders from within Window's File Explorer (or Mac's Finder), the folders will appear within Unity. In the following screenshot, you will see how the folder structure is mirrored between Unity's Project window and Window's File Explorer:

Unity's Project windows and Window's File Explorer

As you can see, these folders created from within Unity are showing up in our project folder saved to our computers.

Note

At this point, it's important to note that we will most likely not use all of these folders during the course of this book. Nevertheless, it is a good working practice to get these folders set up for every project just so that you have a standard template.