In Unity 5
Awesome gents and ladies, today I am going to give a run down of some editor basics in the Unity 5 interface. I have a few extra windows that I’ll set aside for now and we can revisit them later.
There are four primary sections that form the cogs on the Unity Development system which are shown on the screen shot below. Starting from the top center and rotating counter clockwise are the Scene View Window, Hierarchy, Project view and Inspector. The inspector is blank right now because we haven’t selected a game object, but we will soon.
So, I’ll go over each section of the unity editor in sequence.
This usually comes up as a default window. The scene view shows the elements of your came as they are placed into the world. It does not animate any of them normally, except in the case of particles or certain physics options. Think of it as a freeze frame of the game where everything is waiting for the action to start. Pressing the play arrow button above the scene view window will switch the action to game view, which is a demo of your game in action.
A few tricks to note…
- You can actively switch to scene view while your game is playing and view objects as they are moving in real time. A fair warning though. Any changes you make while the game is playing will revert to whatever they were before the game started playing.
- If you click the right mouse button in the window and hold it down, you can use WASD to move forward and backward. You can also pan your view right and left and the best part is that your movement speed increases exponentially, so get ready to zoom at the speed of light if you have sticky fingers. It’s a good way to position yourself to see specific parts of models and inspect details within the game. It’s also a fun way to get from one point to another in a large level.
The hierarchy is your index of every object you’ve placed into your scene. Without going into what game objects are and how they work, jut know that each thing you dragged into the scene or created there through some other means will show up in this explorer. You can select any object and choose to delete it or rearrange it within the hierarchy. Rearranging an object’s position here will not alter it’s position in the scene, so no need to worry.
Items of note…
- If you are having some trouble finding an object in game, you can double click on it in the hierarchy and the scene view will jump right to the object. This is very useful in large, complicated scenes with an array of elements.
- At the top of the hierarchy, you will find a search box. Start typing the name of an object inside the search box and the scene will gray out, leaving only the game objects who share that particular character string in their names to be visible. This is useful for locating game objects that are nested deep in parent trees.
This is the meat and potatoes of your project’s assets. Some might call this the assets folder, as the default use of this view is to search for and select assets stored in your game. Navigating some drop down arrows and folder roots, you can select an asset to modify or drag it into your scene or Hierarchy of the content allows.
In 2D mode, any sprite asset can be dragged into the scene to become a sprite object. We’ll talk about game objects later. in any mode, a model can be dragged into the scene view to show up in game.
- You may import assets into the game by opening the window where the files are contained and dragging them into the Project View Window. Objects will land in whatever folder you highlighted when you released your mouse click.
- You may also right click a folder in the project view and select an option called: Show in Explorer. This opens whatever folder root you selected in windows. After doing this, you can modify files, replace them with new files or delete them entirely. A fair warning, though. I’d suggest that you modify your file locations within the project view and not within windows. This is because Unity keeps track of files using an internal system and it moving a file to a new folder may cause it to lose any modifications you’ve made within the editor. At the least, any objects referencing it will lose their connection.
This one is a whole can of beans that I really can’t go into much detail with. Suffice to say that any file inside project view and any game object inside the hierarchy can be inspected. Click said item with the left mouse button and a slew of components will appear in the inspector. There are a multitude of interfaces for different object types, but the focus in future tutorials will be on components for game objects, asset files and prefabs.
We’ll get to all those in future tutorials, but for now, just know that the inspector will play a very important role in the Unity game development process.
That’s all for now! Join me on the next unity development tutorial.