# Importing models in a packaged project

**Requirements:**

* Unreal Engine 5.0, 5.1, 5.2 or 5.3
* Unreal C++ Project
* Visual Studio 2019 (for 5.0 to 5.2)
* Visual Studio 2022 (for 5.3)
* Anything World Account Details
* Anything World SDK
* Windows

## Setting Up your project

To use pak files in your project, you need to enable/disable a few options to set everything up properly. A part of pak file, Unreal provides other ways to load cooked content into your project a part of paks, but those ways aren’t compatible with others.

<figure><img src="/files/u5cKu6QQPDjo7XvzQPUP" alt=""><figcaption><p>packaging options</p></figcaption></figure>

Firstly, you need to enable the option to use paks and disable the other container options (`Io store` and `Zen Store`). This option will enable the processing of the paks in your packaged project. The other important option is `Generate Chunks`. This option will enable the pool to load multiple paks based on the `chunk id`.

<figure><img src="/files/Ul9Ru8GJzp9JimPRzVYL" alt=""><figcaption><p>Asset Manager options</p></figcaption></figure>

It's important to disable these two options to load Anything World Paks in your project. The first option will specify that all the paks will contain C++ cooked assets inside. If you enable this option, the project will skip all the C++ assets and only load blueprint ones. The second one is the `Editor only` option. Disabling this one will enable all the primary asset labels to be used in a packaged project.

<figure><img src="/files/5CMo71B7u7QDobQZVumD" alt=""><figcaption><p>Optimization options</p></figcaption></figure>

To load materials from paks you need to change the `Default Skin Cache Behavior` from `Inclusive` to `Exclusive`. This option will enable the usage of external materials. A part of that you need higher `Maximum memory for Compute Skin Cache per world` into `1500`.

<figure><img src="/files/eLEfuxJr5SLg6xgxiPWi" alt=""><figcaption><p>skinning options</p></figcaption></figure>

You need to enable `Support 16-bit Bone Index` and `Use Unlimited Bone influences` to load all the animated models in your project.&#x20;

<figure><img src="/files/GTh4dqQrecZxTXWzkoyR" alt=""><figcaption><p>Virtual textures options</p></figcaption></figure>

All the textures that are cooked outside the main project are treated as virtual textures. To load all the textures from pak files, you need to enable this option.If you use `pak chunk strategy` in your project, we highly recommend not surpassing 99 in your chunk IDs. `Anything world model chunk ids` goes from 100 and further.

### Anything World Pak utilities

Anything world plugin comes with a couple of C++ functions that the user can call on his project to request models from the API in his packaged project. All those methods are inside a `UObject` named `PakLoader` that provides the minimum functionalities to load pak files.

<pre class="language-cpp"><code class="lang-cpp">class UPakLoader

    Exposed Blueprint functions:
    
<strong>    * Sets the API key of the user to download models
</strong>    * @param InApiKey - API key of the user
    void SetApiKey(const FString&#x26; InApiKey);
    
    * Downloads an specific model Entry
    * @param Name - Model name
    void DownloadModelEntry(const FString&#x26; Name);
    
    * Loads an specific model Entry from Paks folder
    * @param Name - Model name
    void LoadModelEntry(const FString&#x26; Name);
    
</code></pre>

To use these functionalities, you only need to instantiate one `PakLoader`, Set your API key using `SetApiKey()` method and download the model using the `DownloadModelEntry()` method.

### Pak Tester

Inside the plugin, you will find a user widget named `PakTester`. This widget provides a simple interface to download models using `PakLoader`.

<figure><img src="/files/xcaUjY0AKtnuVNdKtclc" alt=""><figcaption><p>PakTester location</p></figcaption></figure>

<figure><img src="/files/oYhXWl9oyNxRTSwJu0of" alt=""><figcaption><p>PakTester blueprints</p></figcaption></figure>

<figure><img src="/files/fKdN6bIjZzdQrtaGCfXG" alt=""><figcaption><p>PakTester UI</p></figcaption></figure>

To use it, you need to modify it by adding your API Key inside. At the begging of the execution, the widget will create a new PakLoader and set your API Key. The UI adds two buttons, one to download models from the API and the other to load paks from the paks folder.

**Warning**: Remember to add one `Nav Mesh Bounds Volume` inside your map, or the models will not be able to navigate around.


---

# Agent Instructions: 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:

```
GET https://anything-world.gitbook.io/anything-world/quickstart/unreal-library-quickstart/importing-models-in-a-packaged-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
