# Templates

A Template functions the same as a native Unreal Engine template. It is a content bundle that can be used to initialise a new project.

{% hint style="info" %}
Templates can be created from en entire project, or just a single sub-folder
{% endhint %}

## Upload subfolders as separate templates

During upload, users have the option to enable `Upload subfolders as separate templates`.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-b23c7039e37932366f2cdfa6a392ec26639bb497%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

This option creates a template for every immediate sub-folder within the project content folder. We recommend users do this when they want to:

* Upload more than 1 template from a single uproject.
* Exclude content from a template. Assets outside of the sub-folder will be exlcuded from the template.
* Keep the template content organised. It is easier to see what content will be included in your template if it is all contained within one folder.

## Relation to Engine plugins

Engine plugins are uploaded at the same time as templates. When a template is uploaded, all it's dependencies are found and if any exist within a project plugin, this plugin will be treated as an Engine plugin and uploaded as well.

## Guides

<details>

<summary>Create a new Template Assets</summary>

1. (Optional) Create a new folder within your project content directory representing the template content.\
   \
   ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-117742268cfdca9095c1f44b4a173fe36929d7b6%2Fimage.png?alt=media)

{% hint style="info" %} <mark style="color:blue;">This step is important if you want to upload multiple templates at once or if you only want to include part of this uproject in the template. This can be done by enabling the option to</mark> <mark style="color:blue;">`upload content sub-folders as separate templates`</mark> <mark style="color:blue;">later in the upload process.</mark>
{% endhint %}

2. Create a new map.\
   \
   ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-6503f7ba52c857947ca39ec4475d4db5764eeca8%2Fimage.png?alt=media)\\
3. Add some content to your map.

{% hint style="info" %} <mark style="color:blue;">To upload an engine plugin as well as a template, create a project plugin and place at least some of the map content within that project plugin. It will be detected as a dependency and uploaded alongside the template as an engine plugin!</mark>
{% endhint %}

4. Click the Assets button in the top right of the screen to open the Assets upload window.\
   \
   ![](https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-581aecba0dc936cdf12174b1dac8f1384ab6a282%2Fimage.png?alt=media)\\
5. Perform the following actions.

   1. Select Template for the upload type
   2. (Optionally) Add a description for your upload
   3. (Optionally) enable `Upload subfolders as separate templates`
   4. Click Upload

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-84d19fb3b8b29f11b60daf5e884fc195a2059bae%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
6. Click View upload in dashboard to navigate to the dashboard page.\\

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-30c734c7a1a8b557b575899af01d9584e7b008c4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-73ae3817382981e6e6a5ddc3c20f98528c587b94%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">If the dashboard does not open on your new Assets, you can find it in the left widget or by using the filter. It will either be named:</mark>

* <mark style="color:blue;">After the uproject it was uploaded from - if upload subfolders as separate templates was false</mark>
* <mark style="color:blue;">After the folder(s) you created under the project content directory - if upload subfolders as separate templates was true</mark>
  {% endhint %}

4. You have now created a new Template Assets with an initial Assets Version uploaded and can being managing the template.

</details>

<details>

<summary>Uploade a new Template Assets Version</summary>

To upload a new Template Assets Version, simply repeat the process to [create a template Assets](#create-a-new-template-assets). This will automatically detect an Assets exists and upload your template as a new Assets Version.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-15e38dec49e8b4862c25b7cc1c845a42e3e6fe38%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Consume a Template Assets</summary>

Templates are consumed by users via the [Launcher](https://docs.msquared.io/apis-and-tooling/launcher/msquared-launcher/templates).

</details>
