How do I Create my Own Asset?
|Most of the time, you will be adding already-made Assets from the Library into your Game, and editing those in order to create your own Assets. But what do you do if you want to create an Asset completely from scratch?
Please note that custom creating certain aspects of Assets is relatively advanced. For example, the only way to create properties when creating an Asset from scratch is by writing new code. On the other hand, other aspects of custom creating your own Assets are very simple. In this tutorial, we will create a single new Asset by combining other Assets together.
For example, suppose you have these three Assets in your Game:
- Empty (which we just created from the previous step)
- Building Block 2x2x1 (available from the Library)
- Building Block 2x2x1 (this is just a second copy you can drag in from the Library)
Notice in this screenshot that we have each of these Assets in our Project Hierarchy Panel, and they are separate Assets.
1- In the Project Hierarchy, drag the first "Building Block 2x2x1" into "Empty"
2- Next, drag the other "Building Block 2x2x1" into "Empty"
3- Now, you can rename "Empty" by editing the "Name" field in the Inspector to anything you want, like "BigBuilding"
A dialog box will appear, allowing you to Save the Asset to the Library.
Note that if you aren't the author of the Asset, you will not be able to Save it under the same name. You'll have to pick a different name.
Once you save an Asset under a different name, you then become considered the author of that Asset.