Saving the explosion as a prefab

We already talked about prefabs in the last project, so you should have a good understanding of their usefulness. The last step for creating this explosion is to save it within a prefab, so we can use it every time we need an explosion, and not only a random explosion every time the game starts.

In the Prefab folder, create a new prefab, and name it ExplosionPrefab. Then, simply drag and drop it on the Explosion object in the Hierarchy window. It should become blue after this process, so you will know that it has become a prefab, and you can remove it from the scene. As a result, we can use the explosion prefab any time we need one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset