> For the complete documentation index, see [llms.txt](https://cgtoolbox.gitbook.io/cgtoolbox-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-random-assemblies/pcg-data-asset.md).

# PCG Data Asset

First of all you will need a PCG Data asset, it can be created from a right click on a level instance asset in the content browser. Follow these two steps:

***

1\) Create a level instance with a bunch of StaticMesh Actors selected, then right click ⇒ Level ⇒ Create Level Instance.

*A Level instance is a regular Level which can be used in other level (more infos* [*here*](https://dev.epicgames.com/documentation/en-us/unreal-engine/level-instancing-in-unreal-engine)*).*

<details>

<summary><mark style="color:yellow;">Actors of the level instance must have an Actor tag properly set to bind them to a</mark> <a href="/cgtoolbox-docs/pcg-random-assemblies/variant-definition.md"><mark style="color:yellow;">variant</mark></a> <mark style="color:yellow;">definition (random XForm, mesh, etc).</mark></summary>

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FM8qDN1z19uJvq8qU1wiG%2Fimage.png?alt=media&amp;token=905d9ea5-288c-4edc-a203-bf1ec6748f3b" alt=""><figcaption><p>Example of actor tags.</p></figcaption></figure>

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2Ftjil9582Mka5wLTXDUtj%2Fimage.png?alt=media&amp;token=bba4ee83-0c4f-4a96-907d-2d460818bb9f" alt=""><figcaption><p>Where to set actor tag on static mesh actors.</p></figcaption></figure>

</details>

{% hint style="info" %}
To easily set tags on actors, check [Actor Tags manager](/cgtoolbox-docs/actor-tags-manager/intro.md) (available on fab) !
{% endhint %}

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FSMitmcypIvoIsMlk2TKI%2Fimage.png?alt=media&amp;token=ec83ff74-8b97-4491-825c-b49cdb46da44" alt=""><figcaption><p>Create of a level instance from selected Actor(s).</p></figcaption></figure>

{% hint style="info" %}
The tool works with Packed level instance as well as Level Instance but keep in mind than other actors than static mesh actors in a Level Instance will be ignored.
{% endhint %}

***

2\) Then you can create PCG Data asset from level instance by a right click on the level instance asset in the content browser.

By default it saves it on the same folder with a *<mark style="color:$info;">\_PCG</mark>* prefix. It's perfectly fine but you can of course save it wherever you want.

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FeajKTzQeEfZAbesy42J6%2Fimage.png?alt=media&amp;token=69007c9a-ebad-4f9a-9fbd-3f4fde48e788" alt=""><figcaption></figcaption></figure>

***

3\) You create a new [Random Assembly Defintion](/cgtoolbox-docs/pcg-random-assemblies/random-assembly-definition.md) and add the freshly created PCG Data Asset in its   PCG Asset entry:

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FVtqE1TJzp0dK8gE2OU5V%2Fimage.png?alt=media&amp;token=66226e71-912a-4ee3-9326-c7c3250b7546" alt=""><figcaption></figcaption></figure>

***

You can edit a level instance content directly from the edit button on the level instance actor:

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FPbYjB7j3seMxYtiYW5vk%2Fimage.png?alt=media&amp;token=b74ff0f3-75cc-4fdd-bdcd-e085a5665831" alt=""><figcaption></figcaption></figure>

#### <mark style="color:yellow;">**Warning:**</mark>

If you update the content of the level instance, (tags, or adding / removing actors), you'll need to update the PCG Data Asset accordingly either from:

{% tabs %}
{% tab title="Random Assembly Widget" %}
The [Random Assembly Widget](/cgtoolbox-docs/pcg-random-assemblies/random-assembly-widget.md):

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FfCtRAwUbsi2VmY9mRlw2%2Fimage.png?alt=media&amp;token=449c8d39-9b73-4074-9520-436b7d5e5889" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="PCG Data Asset" %}
On the PCG Data asset directly:

<figure><img src="https://3339851461-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuEJQQamuWymLVauXWDL%2Fuploads%2FopKVs9ahURoDHyGdYYd7%2Fimage.png?alt=media&amp;token=f83bf498-25db-4b05-8812-d42b9ea8ee1d" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

***
