Join Jesse Freeman for an in-depth discussion in this video How to use the IDE, part of Unity 4 2D Essential Training.
When you open up Unity you'll be presented with the project wizard. From here you'll be able to open up previous projects you've created, or you can create a new one. We're going to do that. Here you'll be able to define where the project's directory lives. I'm going to go to the desktop and create a project called Super Jetroid 2D demo. Next, there's a series of packages you can optionally include in your project. We're not going to include any of these but it's good to take a look through them. Some of them will actually help you jumpstart your own project or your game.
Next, what we do want to pay attention to is what the project is set up for by default. Right now it's set up for 3D. We're going to want to make sure that this is set to 2D. What this does is it'll configure the camera for 2D rendering, and it will also lock the editor into the x-y axis as we work in our game. So, let's go and create our project. As you can see, once Unity loads up, you're presented with all the tabs that represent the editor. Each of these tabs are configurable. So, you can move any of them over to different panels as you see fit.
So, don't feel that you have to keep this exactly how it is. Feel free to configure it to your own working style. The main panel is the scene panel here. As you can see, we have a camera that exists in our scene. This is where we are going to be creating new game objects and new things in our game. Also laying out levels, and working with stuff before we actually test it, and run it in the game itself. Likewise, you can switch between 3D and 2D mode by simply hitting the 2D toggle. Again, Unity is primarily a 3D editor, so you'll see that here in the 3D mode we're able to navigate through 3D space just like we would in a normal Unity project.
By hitting 2D, we're locked to the correct axis that we need to work with in the 2D space. Next up is the Hierarchy panel. As you can see here, anything that is in our scene will show up inside of the Hierarchy panel. Right now, we have the main camera. If we click on the main camera, it'll select it in our scene. The camera is special. It'll show its own little preview. And the Inspector will be populated with all the properties that help make up the object that we've selected. Here, you can modify any of these properties at real time.
So for example, if you wanted to change the position, we could change the position of the camera to 10. And you'll see that the camera moves over. Likewise, if you go to specific properties, such as anything with numbers. You can also slide the value back and forth by rolling over the label name. And dragging it back and forth. Let's set this back to 0. In addition to just our camera we can create all different kinds of game objects. At the top is a panel here called Game Object from the menu. You can select create other and in here are all the preconfigured game objects that are available to you inside of Unity.
Likewise, you can create empty ones. And we'll talk a little bit more about game objects in the upcoming video. Another thing to note is that each one of these little panels attached to our camera represents a particular type of component. You can add or remove components to any game object inside of the world. By simply clicking on the add component, you will get a list of components that you can add to your game object. Next up is our Project folder. As you can see here, our default folder is Assets. If we were to right-click on this and go to Reveal in Finder or Reveal in Explorer if you are on a PC.
You'll see it'll open up our project, and here is our Assets folder just like we see here. Anything we create in Unity will exist here. These additional folders here are part of the Unity project itself, and we won't be touching them. At this point, it'd be helpful to save our scene. We can go to File, Save scene, and here it'll pop up, and you'll see by default, it's going to want to save this in the Assets folder. I'm going to create a new folder here, called Scenes, and we'll just call this Introduction.
And hit save. As you can see, we now have a folder called scenes, and it contains the scene itself. Another thing to take a look at are the tools up here at the top. The hand tool allows us to pan around without moving into the objects in the scene itself. The move tool allows us to select an object instead of using the inspector, we also have handles here where we can move an object across a specific axis. I'll undo this so that it goes back to 00. We can also rotate and since we're in 2D, we're going to be locked on a specific axis, so that it rotates correctly in 2D space.
And also we can scale, and by just simply dragging these handles out you can make an object larger or smaller. Next, is previewing our game. If you hit the play button you'll go into play mode. And this is where we'll actually run our game. You'll see that the game tab has been selected. Another tab of importance is maximize on play. If you hit play with maximize on play selected it will actually hide the editor itself and show you the game in full screen mode. We'll talk a little bit later about the other panels throughout the course.
As you can see the Unity editor was designed to be hands on. You'll do a lot of your work within the panels itself, within the scene, laying things out with the mouse and we'll be using very little code where possible. Likewise, we'll also be able to extend the panel itself, and we'll add our own type of inspectors as we continue to build out game objects and create our own custom objects in the game itself.
- Installing Unity
- Creating a new project
- Making scripts in Unity with C#
- Working with 2D artwork
- Creating animations
- Creating and moving players
- Adding collisions
- Creating an alien enemy
- Extending Unity with gizmos
- Creating a simple tile map
- Switching between levels
- Publishing your game