Revisiting the Unity 2D Space Shooter | Part 1: Project Setup
Unity is a cross-platform development platform which allows users to create games, simulations, and other digital experiences in 3D and 2D space across multiple industries. In this series of articles, I’ll be revisiting a simple 2D arcade-style space shooter to examine and expand on the fundamentals of the Unity platform and C# programming language, Unity’s object-oriented scripting language of choice.
The platform offers several plans and solutions for individuals, teams, and businesses, but the best way to get started is by downloading the free personal version of the Unity Hub here. This hub acts as the single point of contact for managing installed versions of the Editor and creating and accessing individual projects.
The hub opens on the Projects tab where the name, file location, date last modified, and Editor version of each local project can be seen and accessed. On the left, other tabs include Installs, Learn, and Community:
- Shows a list of each official and pre-release version of the Editor currently installed.
- New Editor versions can be installed via the “Install Editor” button at the top.
- It’s generally best to choose LTS (Long Term Support) Editor versions to maximize project stability through continued support from Unity.
- Provides a list of courses and pathways from Unity Learn to better understand programming and development within Unity.
- An assortment of links to resources for help with any Unity-related questions or comments.
Creating a New Project
After setting up the hub and installing an Editor version, a new project can be created by opening the Projects tab and selecting “New project” in the top right corner. The new project screen then allows you to select which installed Editor version you’d like to use (if you have multiple), the template to use as your project’s base, a project name, and the location where the project will be stored locally.
This space shooter will be using Unity’s 3D template even though it’s intended as a 2D game so that the core functionality and behaviors can be prototyped with 3D objects. However, Unity does allows you to easily swap between 2D and 3D development at any time regardless of the template chosen when the project was created.
Selecting “Create project” will then build the core project and open the Editor once the build is complete.
There will be 6 panels showing when the Editor opens, and these 6 will be the primary panels used through the development of this and most projects built in Unity. These views/panels include:
- Where objects can be created and placed to build applications, including all UI components.
- A representation of how the final application will look from the Scene view.
- A container representing everything placed in the Scene.
- Provides detailed information about a selected object in the Scene/Hierarchy that can be edited.
- A listing of every asset available to use for the application.
- A display for any errors, warnings, or messages generated by the Editor or through a script.
Each of these panels can be rearranged within the Editor to allow for better workflow and greater flexibility depending on user preference.
Once the project is created and the Editor preferably configured, it’s time to begin working on prototyping the player’s behavior.