> 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="/pages/oyhTPOlWmp8jgv6WreJE"><mark style="color:yellow;">variant</mark></a> <mark style="color:yellow;">definition (random XForm, mesh, etc).</mark></summary>

<figure><img src="/files/oeVMpryp96PrKTE8S0id" alt=""><figcaption><p>Example of actor tags.</p></figcaption></figure>

<figure><img src="/files/ZVtU00hR3hOeh54UlTFl" 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="/files/JjGdz5ZSz67rn02cbdSm" 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="/files/NjUxeFrI0NnwkdNQLHcz" 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="/files/HP5JkyvHGytknTZJQUpB" alt=""><figcaption></figcaption></figure>

***

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

<figure><img src="/files/RPMkl8M9e8uDBu7Kpu0I" 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="/files/lCBsyPL0LgVNuU9xajNA" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="/files/8EmpQwtZB1ijPW8x5uD5" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cgtoolbox.gitbook.io/cgtoolbox-docs/pcg-random-assemblies/pcg-data-asset.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
