Quick Start¶
Get a working character customization component running in under 10 minutes.
Overview¶
By the end of this guide you will have:
- A customization database with one race configuration
- A character Blueprint with
UFWCustomizationComponentattached - Skin tone and hair style selection working at runtime
Step 1 -- Create the Customization Database¶
- In the Content Browser, right-click and select Miscellaneous > Data Asset.
- Choose
FWCustomizationDatabaseas the class. - Name it
DA_CustomizationDatabase.
This asset will hold references to all your race configurations.
Step 2 -- Create a Race Configuration¶
- Create another Data Asset, this time choosing
FWRaceConfig. - Name it
DA_RaceConfig_Human. - Open it and set the Race field to
Human. - Add at least one entry to each option array you want to support:
Create a FWSkinToneOption Data Asset for each skin tone. Each option contains an FFWCustomizationTextureSet with:
- Diffuse -- Base color texture
- Normal -- Normal map
- MetallicRoughness -- Packed metallic/roughness
- Mask -- Mask texture for blending
Create a FWHairStyleOption Data Asset for each hairstyle. Each option references:
- Mesh -- The hair skeletal or static mesh
- Texture Set -- Textures applied via the Hair DMI
Create a FWEyeColorOption Data Asset for each eye color variant, with its own texture set.
- Back in
DA_RaceConfig_Human, add your new option assets to the corresponding arrays. - Open
DA_CustomizationDatabaseand addDA_RaceConfig_Humanto its race config list.
Step 3 -- Add the Component to Your Character¶
In Blueprints¶
- Open your character Blueprint.
- Click Add Component and search for
FWCustomization. - Select
FW Customization Component. - In the Details panel, set Database to
DA_CustomizationDatabase.
In C++¶
// In your character header
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
TObjectPtr<UFWCustomizationComponent> CustomizationComp;
// In your character constructor
CustomizationComp = CreateDefaultSubobject<UFWCustomizationComponent>(TEXT("CustomizationComp"));
Then in BeginPlay or your initialization logic:
UFWCustomizationDatabase* DB = LoadObject<UFWCustomizationDatabase>(
nullptr, TEXT("/Game/Data/DA_CustomizationDatabase"));
CustomizationComp->SetDatabase(DB);
CustomizationComp->SetRace(EFWRace::Human);
CustomizationComp->SetGender(EFWGender::Male);
CustomizationComp->RefreshVisuals();
Step 4 -- Apply Customization at Runtime¶
To change a slot (e.g., skin tone), call SetSlotSelection:
- Get a reference to the Customization Component.
- Call Set Slot Selection with the slot enum and the index of the desired option.
- The component automatically updates DMIs and broadcasts
OnSlotChanged.
Step 5 -- Listen for Events¶
Bind to events to update your UI when selections change:
CustomizationComp->OnSlotChanged.AddDynamic(this, &AMyCharacter::HandleSlotChanged);
CustomizationComp->OnProfileApplied.AddDynamic(this, &AMyCharacter::HandleProfileApplied);
void AMyCharacter::HandleSlotChanged(EFWCustomizationSlot Slot, int32 NewIndex)
{
// Update UI to reflect the new selection
}
void AMyCharacter::HandleProfileApplied()
{
// Full profile was loaded -- refresh all UI elements
}
Result¶
You now have a character that:
- Loads customization options from a data-driven database
- Swaps skin tones, hair styles, and other options at runtime via DMI
- Broadcasts events that your UI can bind to
Next Steps¶
- Read the full API Reference for all available functions and events.
- See Configuration for detailed database and race config setup.
- Follow the Building a Character Creator tutorial for a complete UI integration walkthrough.