How do I Create my Own Asset?

From The Endless Mission Wiki
Jump to: navigation, search
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.


Editor - Search for Asset in Library.png
In the Editor, if you right-click on an empty position in the Project Hierarchy Panel on the left side, you will see a contextual menu appear. If you select "Create Empty", that will create a minimal Asset containing nothing, which you may use for various purposes.
Editor - Project Hierarchy Example.png
It is also possible to assemble an Asset by dragging and dropping Assets on top of each other in the Project Hierarchy Panel.

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.

Editor - Project Hierarchy Example 2.png
You can combine these three into one Asset by performing the following steps:

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"

Editor - Project Hierarchy Example 3.png
Finally, if you wanted to save off this Asset to the Library, either for later re-use, or for publishing to the community, you can right-click this Asset in the Project Hierarchy Panel and select "Save As".

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.