# 5. Import 2D Avatar Assets

## TL;DR

1. [Open the Importer window](#open-the-importer-window)
2. [Open the trait mapping file](#open-the-trait-mapping-file)
3. [Set the location of PSBs](#set-the-location-of-psbs)
4. [Change the setting of Imported Assets](#change-the-settings-of-imported-psb-assets)
5. [Try the Avatar Selector and Trait Finder](#avatar-selector-with-trait-finder)

## Open the Importer window

* In the header tab, choose <mark style="color:purple;">`MYTY Kit > Import 2D Avatar Asset`</mark> to open the <mark style="color:purple;">`Importer 2D Avatar Asset`</mark> window

![Choose MYTY Kit > Import 2D Avatar Asset](/files/56YfPAPAB9YEfO3eXpzF)

## Open the trait mapping file

1. Click the <mark style="color:purple;">`open`</mark> button next to the <mark style="color:purple;">`Trait mapping file`</mark> input box.
2. Locate the <mark style="color:purple;">`Trait mapping file`</mark> that you downloaded from [2. Trait Mapping](/products/kit/getting-started/2.-trait-mapping.md) and click <mark style="color:purple;">`Open`</mark>.

![](/files/DK32vcrdkRHKxrsJiWmv)

## Set the location of PSBs

1. When you open the <mark style="color:purple;">`Trait mapping file`</mark>, a <mark style="color:purple;">`list of related PSB files`</mark> will be generated. For each <mark style="color:purple;">`file name`</mark>, click <mark style="color:purple;">`Browse`</mark> and enter the location of the <mark style="color:purple;">`PSB file`</mark>in question.

{% hint style="info" %}
If the PSB file and the trait mapping file are in the same folder, **the location of the PSB file will be automatically entered**.
{% endhint %}

![A list of PSB files related to a trait mapping file. You can enter each PSB file’s location with the Browse button.](/files/cFizjFHZZxCjCwaZeKJ1)

2\. Once the locations of all <mark style="color:purple;">`PSB files`</mark> have been entered, click the <mark style="color:purple;">`Import`</mark> button to import all assets.

![A list of PSB files and their locations. You can use the Import button to import the files to the Project panel.](/files/EJtf7ODtRMbSaC3oTWSH)

![Import is complete. Press OK to close window.
](/files/Me44Mbmr4Eh0gaUlHQFJ)

3\. Import is complete. Press <mark style="color:purple;">`OK`</mark> to close window.

## Change the settings of imported PSB assets

{% embed url="<https://youtu.be/TsNm5c2tpgY>" %}
Tutorial video - How to change the settings of imported PSB assets
{% endembed %}

{% embed url="<https://youtu.be/PgA-SbvGJKg>" %}

1. Imported PSB files can be found in the Project window. Choose <mark style="color:purple;">`Assets > MYTYAsset > ImportedAvatarAssets`</mark>.

![](/files/WMAfdbzBiXt7m9kMiPHk)

2\. Detailed settings of an imported <mark style="color:purple;">`PSB file`</mark> can be seen in the <mark style="color:purple;">`Inspector`</mark> window.

{% hint style="info" %}
PSB files that have editable sprites have a right-arrow icon on top of the file icon.
{% endhint %}

![A PSB file icon with a right-arrow icon.](/files/p8tv1ryuhcs5TCA1aeLf)

![Change the settings of imported PSP assets in the Inspector window. (Steps 3, 4, and 5)](/files/VexQyEXhPlGa3J3VRfjo)

3\. In the Inspector window’s <mark style="color:purple;">`Layer Import`</mark>section, check the <mark style="color:purple;">`Include Hidden Layers`</mark>and <mark style="color:purple;">`Use Layer Group`</mark>checkboxes.

{% hint style="info" %}
This includes all hidden layers of the PSB file, and enables the use of the layer structure.
{% endhint %}

![Check all three checkboxes in the Layer Import section.](/files/KuaGACSqOSSNR9DSA0fz)

4\. In the Inspector window’s <mark style="color:purple;">`Platform Settings`</mark> section, change the <mark style="color:purple;">`Max Size`</mark>to <mark style="color:purple;">`8192`</mark>.

{% hint style="info" %}
Max Size is the maximum resolution of images imported to Unity. **It is recommended to set this to an optimum of 8192.**
{% endhint %}

![Change the Max Size to 8192 in Platform Settings](/files/NThyv7gOq5NvNTKHsmmH)

5\. Apply changes by clicking the <mark style="color:purple;">`Apply`</mark> button, located under the Inspector window’s <mark style="color:purple;">`Advanced`</mark> section.

![Save changes by clicking the Apply button in the lower right.](/files/mhkTHabmimQtgKxWMOlS)

## Is the image’s outline jagged?

### How to change settings for anti-aliasing a jagged PSB.

1\. In the PSB file’s Inspector window, change <mark style="color:purple;">`Texture > Filter Mode`</mark> to <mark style="color:purple;">`Point(no filter)`</mark>.

![](/files/5sIQEwVxL5pN7Vh6cAaq)

2\. In the PSB file’s Inspector window, change <mark style="color:purple;">`Platform Settings > Max Size`</mark> to <mark style="color:purple;">`8192`</mark>.\
![](/files/VfCz8Xc8H6w0dgevgXko)

3\. Save changes by clicking the `Apply` button below the Inspector window’s <mark style="color:purple;">`Advanced`</mark> section.\
![](/files/gtVSV1gSxUfEkEPwPQfe)

![How to change settings for anti-aliasing a jagged PSB.](/files/d2PLsU0oyfs1h5giypfi)

{% hint style="info" %}
For more information on the PSB Importer, refer to the official [Unity manual](https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@6.0/manual/PSD-importer-properties.html)
{% endhint %}

***

## Avatar Selector with Trait Finder

<figure><img src="/files/hzqmaBBW80PGHoTRYR4I" alt=""><figcaption></figcaption></figure>

### How to use AvatarSelector

* You can use the Hierarchy window’s <mark style="color:purple;">`AvatarSelector`</mark> object to preview each <mark style="color:purple;">`NFT Avatar ID`</mark> .
* Try changing the <mark style="color:purple;">`Avatar ID`</mark> in the <mark style="color:purple;">`AvatarSelector`</mark>'s Inspector window. The Avatar ID can be changed even when the project is playing.

<figure><img src="/files/6lvW8ywOKMiy62Z7KA8E" alt=""><figcaption><p>A demonstration the Avatar Selector</p></figcaption></figure>

### How to use Trait Finder

* Click the ◉ icon next to the <mark style="color:purple;">`Find with`</mark> box, search for the trait name you want to find, and select it.
* If you click the <mark style="color:purple;">`Find next`</mark> button, the avatars containing the trait are displayed on Scene window in ID order.

{% hint style="danger" %}
Please configure your Avatar ID to the smallest number before clicking Find next.
{% endhint %}

<figure><img src="/files/PzA2Ml92rEweddhxtwX1" alt=""><figcaption><p>A demonstration the Trait Finder</p></figcaption></figure>

{% hint style="success" %}
**Have a question or an idea?** \
If you have a question to ask or an idea to share, participate in the [MYTY Kit Community](https://discord.com/invite/myty). We’d love to hear from you.:smile:
{% endhint %}


---

# 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://myty.gitbook.io/products/kit/getting-started/5.-import-2d-avatar-assets.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.
