Reuse of Assets — Prefab!

Andrew Lengen
Mar 24, 2021

--

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!

--

--

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!