Reuse of Assets — Prefab!

A laser bolt from a spacecraft is a single object, reused. In Unity, to reuse objects we want to “Prefab” them. Prefab systems allow us to “create, configure, and store a GameObject complete with all its components, property values, and child GameObjects as a reusable Asset”.

Why does this matter? Well, I want to make our Cube fire a laser, not have to recreate the asset thousands of times, and why not? Lasers are pretty great!

So I have created and miniaturized a capsule that will eventually function as our primitive laser, tucked it into our “Prefabs” folder and given the laser a nice green color!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Lengen

If ambition and practicality amalgamated, it would be me! I am here to climb the mountains of my ambition and catalog my journey so that someone can be changed!