Creating a GameObject

To create a GameObject, click on the GameObject menu and select Create Empty or click the Create Other drop-down and select from Unity’s premade GameObjects. An empty GameObject will be empty, except for a Transform Component. The Transform Component is automatically attached to any GameObject and cannot be removed. Figure 2.6 shows the GameObject menu and its contents.

Image

Figure 2.6 The GameObject menu—Create Other

Let’s create an empty GameObject that we will build upon for our first game sprite in Chapter 3, “Creating 2D Sprites”:

1. Left-click the GameObject menu and select Create Empty (or use Ctrl + Shift + N for the ...

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.