Supporting our Community:
We’re making Learn Premium available to all users in perpetuity.
Graphics & Visual Effects
Mobile & Touch
AI & Navigation
Browse All Topics
A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store, and participate in the Unity community.
Create a Unity ID
Sign in to track your progress
Where am I?
Create a Laser Prefab
Create a Laser Shooter
Also included in
Getting Started with Playground: For Educators
You will create a new GameObject that allows the player to destroy obstacles
By the end of this tutorial, you will be able to
Add a (trigger) Capsule Collider 2D to keep track of when objects touch or intersect
Add a Bullet attribute script to keep track of points
Create a prefab
Create an empty GameObject
Add the Object Shooter script
Insert a Prefab as a Prefab to Spawn for the Object Shooter script
Capsule Collider 2D
Bullet Attribute script
Object Shooter script
What would happen if the laser was not turned into a Prefab? Would the lasers still work in the same way? Why or not?
What would happen if the player could gain points for destroying asteroids? How would it change the way the game ends?
Select your Unity version
Last updated: February 13, 2020
Topics we'll cover
Learn to code by making a game. Gain the skills to become Unity Certified.
Copyright © 2020 Unity Technologies