# SETUP GUIDE

### Layer Collision Settings

To avoid the character colliding with its own weapon. Put the character and weapon into different layer and in the project’s Physics 2D settings, make sure these two layers do not collide.

You need to setup this by hand as project settings will not be imported with the asset pack. <br>

In this case we put characters into `Player` layer and weapons into `Player Weapon` layer. Of course, this may vary based on your need.

All the character presets are variation prefabs of `Cainos\Customizable Pixel Character\Prefab\PF Pixel Character`. So for overall changes you only need to modify this one.

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FVThlDLsTGpYKbfphe5IG%2Flayer%20collision%20settings.png?alt=media&#x26;token=0dcdda3b-644a-4c99-9c12-4584d33e6c8e" alt="" width="224"><figcaption></figcaption></figure>

### Custom Sort Axis&#xD;

It is recommended that you set `Transparency Sort Mode` to `Custom Axis` and `Transparency Sort Axis` to `(0,0,1)` at the Graphics settings.

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FReyaJKcfwtn51FsHYhpq%2Fcustom_sort_axis.png?alt=media&#x26;token=69d1fe6a-b329-4c9f-ba8e-a79361f2aba7" alt="" width="375"><figcaption></figcaption></figure>

### Skin Weights&#xD;

For best animation quality, in `Project Settings/Quality`, `Skin Weights` should be set to at least `2 Bones`.

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FqeuTRsYH4edqxgm7KNRb%2Fskin_weights.png?alt=media&#x26;token=1d8cda51-7310-4c11-9463-da86c201b610" alt="" width="375"><figcaption></figcaption></figure>

### Color Space

It is recommended to use `Linear` color space with this asset. You can find it in `Project Settings/Player/Other Settings`.

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2Fd8MnEKhWwepBc70ttib1%2Fcolor_space.png?alt=media&#x26;token=98e32829-df26-4457-ac1d-860834919120" alt="" width="375"><figcaption></figcaption></figure>

### Lighting Support

By default, the character shaders behave like an unlit sprite shader, and can be used in any render pipeline.

But if you need lighting on the character, you need to install additional shaders to make them support lighting.

Currently lighting on character only supports `Universal Render Pipeline`.

### Universal Render Pipeline 2D Lighting

Import the patch version that corresponds to your Unity version. It will replace current character shaders with versions that support URP 2D Lighting.

* Before Unity 6: Import `Patch - URP 2D Lit`
* Unity 6.0 to 6.2: Import `Patch - URP 2D Lit - Unity 6.0 to 6.2`
* Unity 6.3 and later: Import `Patch - URP 2D Lit - Unity 6.3`

Make sure your 2D lighting is properly set up so the character can be displayed correctly.

### Universal Render Pipeline 3D Lighting

Import the patch version that corresponds to your Unity version. It will replace current character shaders with versions that support URP 3D Lighting.

* Before Unity 6: Import `Patch - URP Lit`
* Unity 6.x: Import `Patch - URP Lit - Unity 6`

### Input System in Unity 6.1

For compatiblity, the default input method in this asset still uses the old input manager. And in Unity 6.1, the old input manager is no longer the default option.

If you encounter any error regarding the input system. Please change the `Active Input Handling`  in `Project Settings/Player` to `Both`

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2Fo3i6ZxhhRxQIJsxyJDje%2FUnity%206.1%20Input%20Handling.png?alt=media&#x26;token=6641149d-af54-4987-94b2-e466e10308b1" alt="" width="375"><figcaption></figcaption></figure>

### Sorting Order Glitch When Using Multiple Character&#xD;

You may see some glitch when two characters are too close. It happens when the two characters take up the same z space. Give them different z position value will solve the problem.\
You can set the character’s z scale to a smaller value like `0.1` (but avoid setting it to `0.0`), so that it takes up less z space.

<div><figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FxfN1q9d5OWDY6erSttG7%2Fsor_order_glitch_01.png?alt=media&#x26;token=52795121-15e4-43a0-afe5-c1863e1fecca" alt="" width="177"><figcaption></figcaption></figure> <figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FXrBngNP6SyuygOjV9DNO%2Fsor_order_glitch_02.png?alt=media&#x26;token=345b02f9-cc15-4e47-ba12-6840d1096adc" alt="" width="161"><figcaption></figcaption></figure></div>

### Parts of the Character Not Visible When Using a Background

The background may be positioned at the same z-coordinate as the character, causing it to occlude parts of the model. Since the character is not a flat plane (it has 3D depth), overlapping z-positions can result in rendering conflicts.

Adjust the background’s position by moving it backward along the z-axis (assigning it a larger z-value). This ensures proper depth sorting, allowing the character to render fully in front of the background.

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FSgvcJjKzRxDey8HbukN5%2Fparts_of_character_no_visible%2001.png?alt=media&#x26;token=fdf13288-6628-49f1-aa3a-cbc4d98f2708" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2697269646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVAsWZLJR6xuMkfJM3gAU%2Fuploads%2FL3w1EUPV81YuOlgjxApC%2Fparts_of_character_no_visible%2002.png?alt=media&#x26;token=63d2fc89-40e3-4faf-b3f7-81a720266412" alt="" width="563"><figcaption></figcaption></figure>
