# 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](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FwDM60GYWXPqBcrNbzGr2%2Fopen%20the%20importer%20window.gif?alt=media\&token=1e53e97a-40ab-4d0c-b372-6d24cd5d5d11)

## 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](https://myty.gitbook.io/myty-kit/getting-started/2.-trait-mapping "mention") and click <mark style="color:purple;">`Open`</mark>.

![](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FARoKlHXFVgZSRe73dsuh%2Fset%20trait%20mapper%20file.gif?alt=media\&token=ee08e720-1239-4a7c-9b1d-0e2fbe768cd5)

## 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.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FG4Q29zaWG7NzZg0vCYKa%2FScreen%20Shot%202022-06-13%20at%201.54.46%20PM.png?alt=media\&token=5d085d06-9118-4cca-8ba0-986720b8b17f)

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.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FVXKQFiT6VubWaMInWJrk%2FScreen%20Shot%202022-06-13%20at%201.53.31%20PM.png?alt=media\&token=cbb18440-65db-4cac-b533-274c3e12b518)

![Import is complete. Press OK to close window.
](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2Ft7PfeKeFVhj3txhFA8sG%2FScreen%20Shot%202022-06-13%20at%202.03.12%20PM.png?alt=media\&token=a8ba6f9a-470c-409a-8b62-3438a45f66a5)

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>.

![](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2F0eYhhATsagDouyBLBfZZ%2FScreen%20Shot%202022-06-13%20at%202.04.20%20PM.png?alt=media\&token=87ef269f-c2ae-4a49-a8ed-bbbe90872679)

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.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FIReQvhFicK2CxRFQq1nv%2FScreen%20Shot%202022-06-13%20at%205.34.13%20PM.png?alt=media\&token=1e28cee6-24c7-4c53-8f06-44ae767a545d)

![Change the settings of imported PSP assets in the Inspector window. (Steps 3, 4, and 5)](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FoYCYFEJyV8nwglE0je6y%2Fcheck%20inspector%20setting.gif?alt=media\&token=f1fce16d-2c42-4cb5-aa61-efe70162452e)

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.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FaIRXy3ANlhJ4AIHi9wIr%2FScreen%20Shot%202022-06-13%20at%202.17.58%20PM.png?alt=media\&token=803c08f6-6ed2-4b73-a68c-f7eda009b433)

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](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FOH7Jm2ICgL0qcZarbN6Q%2FScreen%20Shot%202022-06-13%20at%202.14.28%20PM.png?alt=media\&token=3aa9b745-176f-4fb0-aea8-4427e4d19f02)

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.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FYZrQlV42lOuHwkEOgZOc%2FScreen%20Shot%202022-06-13%20at%202.11.12%20PM.png?alt=media\&token=1a6e0b77-462a-4db7-8924-be0d0b71c7ec)

## 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>.

![](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FMUynQAuFhSwID2HEagk4%2FScreen%20Shot%202022-06-21%20at%205.05.04%20PM.png?alt=media\&token=12dc75b5-e7a9-46bc-91c4-62b935d49d65)

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>.\
![](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2Ffl9vt2fToKWNjuVE0HcL%2FScreen%20Shot%202022-06-21%20at%205.04.43%20PM.png?alt=media\&token=60fa07b8-af25-41f1-84cc-acfca863f1ab)

3\. Save changes by clicking the `Apply` button below the Inspector window’s <mark style="color:purple;">`Advanced`</mark> section.\
![](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FVigx9MSMIlnscxauQGu0%2FScreen%20Shot%202022-06-13%20at%202.11.12%20PM.png?alt=media\&token=d5c323eb-1e91-4a44-ba35-470fe6bca11e)

![How to change settings for anti-aliasing a jagged PSB.](https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2F0Gc9WR8sAKCBUVyAwBIf%2Fanti-aliasing.gif?alt=media\&token=7daf0f35-0ede-4214-9474-b1a33553c30e)

{% 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="https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FNnb5oUb4MqVrY6njHoVH%2FImage%20-%2026-%20avatar%20selector.png?alt=media&#x26;token=c69f84ab-2642-44b4-8a14-c2ddd7ef7b9e" 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="https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2F4dFNzXbn6Y9Na3cYDV0H%2Favatar%20selector.gif?alt=media&#x26;token=9569caa6-30cc-4ff0-b145-f090d3406a99" 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="https://667382355-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZT6KDsWarcdCAiEJZ3TV%2Fuploads%2FSpt3eyHsIFPh4II6Z5Fi%2FTraitFinder.gif?alt=media&#x26;token=06e1f6ce-8ebe-4827-8900-5ec9ebd56250" 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 %}
