Skip to main content

Data Assets

This guide explains how to manage parameters as reusable Data Assets.

Overview

Using KawaiiPhysicsLimitsDataAsset, you can share collision settings and limit parameters across multiple characters.

Creating a Data Asset

  1. Right-click in Content Browser
  2. Select Miscellaneous > Data Asset
  3. Select KawaiiPhysicsLimitsDataAsset
  4. Name and save

DataAsset Regex Settings

Specifying bone sets with regular expressions in DataAsset

Setting Parameters

Data Assets can store the following parameters:

  • Spherical Limits
  • Capsule Limits
  • Planar Limits

Usage

  1. Set the Limits Data Asset property in the KawaiiPhysics node
  2. Parameters from the Data Asset are automatically loaded
UPROPERTY()
UKawaiiPhysicsLimitsDataAsset* LimitsDataAsset;

BoneConstraint Settings

From v1.14.0, BoneConstraint (distance constraints between bones) can be configured in DataAssets. Became official in v1.19.0.

BoneConstraint Demo

Bone sets for constraints can be specified using regular expressions:

// Example: Constraints between skirt_01_* and skirt_02_*
Bone1: skirt_01_.*
Bone2: skirt_02_.*

BoneConstraintsDataAsset

Version Info

Stabilized in v1.19.0

A Data Asset dedicated to BoneConstraint settings. Recommended when you want to share settings across multiple AnimNodes or Animation Blueprints.

View Source

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Bone Constraint")
TObjectPtr<UKawaiiPhysicsBoneConstraintsDataAsset> BoneConstraintsDataAsset;

BoneConstraintsDataAsset Parameters

ParameterTypeDescription
BoneConstraintsDataTArray<FModifyBoneConstraintData>Array of bone constraint data
RegexPatternListTArray<FRegexPatternBoneSet>Regular expression pattern list (editor only)
PreviewSkeletonTSoftObjectPtr<USkeleton>Preview skeleton for editor

FModifyBoneConstraintData Struct

ParameterTypeDescription
BoneReference1FBoneReferenceReference to first bone
BoneReference2FBoneReferenceReference to second bone
bOverrideComplianceboolWhether to override Compliance Type
ComplianceTypeEXPBDComplianceTypeCompliance Type when overriding (Default: Leather)

Batch Setup with Regular Expressions

Use the ApplyRegex button to automatically generate bone constraints from regex patterns.

// FRegexPatternBoneSet
RegexPatternBone1 = "skirt_01_.*"; // First bone pattern
RegexPatternBone2 = "skirt_02_.*"; // Second bone pattern

Benefits

Reusability

Collision settings can be shared among characters with the same body type.

Batch Changes

Modifying the Data Asset reflects changes to all referencing characters.

Version Control

Can be managed as assets, making change history easier to track.

Best Practices

  1. Create per body type: "Male_Standard", "Female_Standard", etc.
  2. Separate by part: "Hair_Collision", "Tail_Collision", etc.
  3. Naming convention: DA_KP_[BodyType]_[Part]
Content/
└── KawaiiPhysics/
└── DataAssets/
├── DA_KP_Female_Hair
├── DA_KP_Female_Skirt
└── DA_KP_Male_Cape