Robster · Docs
Support

2D Rigged Character Kit

A side-view pixel art character for Unity, rigged with bones and animated with smooth bone animation.

12 outfits 5 skin tones 7 animations PSD template URP 2D
Six pixel art characters in different outfits and poses

Every body part is a sprite on a bone, and every outfit plugs into the same rig through a Sprite Library. Swap hair, face, top and bottom independently, pick a skin tone, and all animations keep working. Skin tones are a palette swap in the shader: real palette colours, no tint. All art uses the AAP-64 palette.

Thank you for using this asset. If anything is unclear, get in touch.

Requirements

  • Unity 6 (tested with 6000.5)
  • Universal Render Pipeline 17 with the 2D Renderer
  • 2D Animation 15 and 2D PSD Importer 14 (both part of the 2D feature set)
The skin tone shader is a copy of URP's Sprite-Lit-Default. The Built-in Render Pipeline and the URP Universal (3D) Renderer are not supported.

Quick start

  1. Open Demo/PixelCharacterDemo.unity and press Play.
  2. To use the character in your own scene, drag Prefabs/PixelCharacter.prefab into it.
  3. For skin tones other than "Original", add one SkinTonePalette component to the scene (an empty GameObject is fine) and assign Shaders/SpriteLitSkinTone.shader to it.

Set the look in the Inspector under Look on CharacterVisualController. The prefab previews the indices while you edit them.

Demo scene with a character creator panel and a lineup of characters
The demo scene: build a look on the left, preview every outfit in the lineup.

Folder structure

FolderContents
Art/Outfits12 outfit PSDs, one sprite per body part
Art/TemplateCharacterTemplate.psd, the base body to paint new outfits on
Art/PixelCharacter.spriteLibSprite Library: 12 categories (body parts), labels 0 to 11 (outfits)
AnimationsAnimator controller and clips
PrefabsPixelCharacter.prefab
RuntimeScripts (PixelCharacterKit namespace, own assembly)
ShadersSkin tone shader
DemoDemo scene and its script (own assembly, safe to delete)

Outfits

All 12 outfits side by side
IndexFileLook
0Outfit_01_CasualTeal V-neck, khaki trousers, blonde ponytail
1Outfit_02_CasualOchre V-neck, navy trousers, black ponytail
2Outfit_03_JacketGreen jacket, cream top, shorts, auburn bob
3Outfit_04_JacketPurple jacket, white top, denim shorts, silver bob
4Outfit_05_TeeRed tee, charcoal trousers, brown hair
5Outfit_06_TeeBlue tee, khaki trousers, copper hair
6Outfit_07_HoodieGreen hoodie, blue jeans, blonde bun and beard
7Outfit_08_HoodieOchre hoodie, dark trousers, auburn bun and beard
8Outfit_09_SuitNavy suit, amber tie, black hair
9Outfit_10_SuitBeige suit, purple tie, brown hair
10Outfit_11_ShirtPink shirt, navy trousers, blonde bun and beard
11Outfit_12_ShirtMint shirt, khaki trousers, black bun and beard

Mix and match

Swap clothes in groups: Top = Body and both arms, Bottom = both legs and both feet (the feet carry the trouser hems). CharacterBodyPartExtensions.Top and .Bottom hold these groups.

Six characters with mixed hair, tops and bottoms

Skin tones

The same character in five skin tones

All skin is painted with exactly these 4 key colours. The shader replaces them with the 4 colours of the selected tone in SkinTonePalette. Tone 0 ("Original") keeps the default material. Add or edit tones in the Inspector; changes show live.

StepKey colour
Base#ca8e7a
Shadow#ae7a69
Outline#a1634e
Crease#7f5a4e

Rules for your own art

  • Use the 4 key colours only for skin. The same value in clothing would change colour too.
  • No in-between shades in the skin (soft brushes, anti-aliasing). Those pixels would not swap.
  • Keep character textures uncompressed and without mipmaps (the template's importer settings already are). Compression shifts colour values and breaks the swap. Mipmaps let low texture quality settings swap in a half-size copy, which smears the pixels.

Animations

Frames of the walk, run, wave, idle, interact, sleep and grab animations
StateLoopNotes
IdleyesDefault state
WalkyesFootstep events
RunyesFootstep events
InteractyesWorking at a desk or machine
SleepnoLies down; play it reversed to get up
WavenoGesture, returns to Idle
GrabnoGesture, returns to Idle

The arms and feet use 2D IK (IKManager2D with limb solvers), part of the 2D Animation package.

Scripting

All scripts live in the PixelCharacterKit namespace. CharacterVisualController on the prefab root is the one component you talk to.

using PixelCharacterKit;

var character = GetComponent<CharacterVisualController>();

// Whole outfit, skin tone 2
character.ApplyVisualData(CharacterVisualData.Outfit(4, skinTone: 2));

// Mix and match
character.SetBodyPart(CharacterBodyPart.Hair, 7);
character.SetBodyParts(CharacterBodyPartExtensions.Top, 9);
character.SetSkinTone(3);

// Random look, e.g. for crowds
character.Randomize();

// Save and restore: CharacterVisualData is a plain serializable class
CharacterVisualData saved = character.VisualData;
character.ApplyVisualData(saved);

// Animation
character.PlayAnimation(CharacterAnimationType.Walk);   // safe to call every frame
character.PlayGesture(CharacterAnimationType.Wave);     // one-shot, returns to Idle
StartCoroutine(character.PlayReversed(CharacterAnimationType.Sleep)); // get up again
character.Face(right: false);                            // mirror

// Footsteps: raised by animation events in Walk and Run
character.Footstep += () => audioSource.PlayOneShot(stepClip);

Main types

TypePurpose
CharacterVisualControllerLook (body parts, skin tone) and animation of one character
CharacterVisualDataSerializable look: one index per body part plus a skin tone
CharacterBodyPartThe 12 body parts; CharacterBodyPartExtensions adds the Top and Bottom groups
CharacterAnimationTypeAnimator states: Idle, Walk, Run, Interact, Sleep, Wave, Grab
SkinTonePaletteSkin tones and their shared materials; one per scene

Your own outfits

The PSD template and its 12 layers
  1. In Unity, duplicate Art/Template/CharacterTemplate.psd (Ctrl+D) or one of the outfits. Duplicating in Unity keeps the importer settings: sprite rects, pivots and bone bindings.
  2. Paint over the layers in a PSD editor (Photoshop, Aseprite, Krita, Photopea). Keep the layer names and the layer order, do not add or remove layers.
  3. Stay inside the layer boxes below. Every layer has two nearly invisible anchor pixels (RGBA 0,0,0,1) at the corners of its box. Do not delete them: they keep the layer bounds identical in every file, which is why one set of importer settings fits all outfits.
  4. Open Art/PixelCharacter.spriteLib and add your sprites to each category with the next free number as label (12, 13, ...). The index API picks them up automatically.

Layer boxes in pixels, origin top left, x1/y1 exclusive, canvas 48 × 110:

LayerCategoryx0y0x1y1
BeinLLegL25634189
FussLFootL288044104
BeinRLegR15653290
FussRFootR168331105
OberarmLUpperArmL28354356
UnterarmLLowerArmL34484868
BodyBody13323973
HeadHead1394240
FaceFace19204139
HairHair714838
OberarmRUpperArmR6372360
UnterarmRLowerArmR5511675
Layer and bone names are German (Bein = leg, Fuss = foot, Oberarm = upper arm, Unterarm = lower arm). The Sprite Library categories and the scripting API use English names. Do not rename bones: the animation clips address them by name.

Limitations

  • Side view only, facing right. Mirror with Face(false) for the other direction.
  • Smooth bone animation: rotated pixel sprites are not strictly pixel-perfect. Point filtering keeps the edges crisp. For a frame-by-frame look, set the animation curves to Constant.

FAQ

Characters with a skin tone are cyan for a moment.

That is Unity's placeholder while the editor compiles the skin tone shader in the background. It only happens in the editor, not in builds.

The pixels look smeared.

Make sure your character textures have mipmaps turned off. With mipmaps on, low texture quality settings (for example "Very Low") use a half-size copy of the texture.

The characters look wrong or are missing.

The sprites use the 2D lit shader. Your project needs URP with the 2D Renderer; the demo scene uses a Global Light 2D.

Can I use the characters in commercial games?

Yes. The asset is licensed under the standard Unity Asset Store EULA.

Changelog

1.0.0

  • Initial release: 12 outfits, 5 skin tones, 7 animations, PSD template, demo scene.

Support

Questions, bug reports or ideas for new outfits: hyrobb@gmail.com.