UAR51SkeletonMapping
UCLASS(BlueprintType)
class AR51SDK_API UAR51SkeletonMapping : public UDataAsset
Inherits: UDataAsset (Unreal Engine)
A reusable per-skeleton bone mapping, authored in the AR 51 humanoid mapping editor. It maps each canonical AR 51 bone name to a bone on your target skeleton, plus the forearm twist chains. One asset is shared by every UAR51Character that drives the same skeleton, and it replaces the legacy UNodeMappingContainer workflow.
This page is reference (facts only). For the step-by-step author a mapping asset → drive a character walkthrough, see the How-to guide.
Properties
All EditAnywhere, BlueprintReadWrite, Category "AR51 Mapping" (except where noted).
| Property | Type | Default | Description |
|---|---|---|---|
| Mapping | |||
TargetSkeleton | TSoftObjectPtr<USkeleton> | — | the skeleton this mapping targets; drives the editor bone picker |
BoneMap | TMap<FName,FName> | — | canonical AR 51 bone name → target skeleton bone name |
| Twist | |||
LeftForearmTwistBones | TArray<FBoneWeight> | — | left forearm twist bones + blend weights (Category …|Twist) |
RightForearmTwistBones | TArray<FBoneWeight> | — | right forearm twist bones + blend weights (Category …|Twist) |
| Editor | |||
EditorSelectedBone | FName | NAME_None | Transient — editor-only selection channel; not serialized |
Method summary
Instance — all plain C++ (no UFUNCTION).
| Method | Returns | |
|---|---|---|
GetTargetToSourceMappingTable | void | C++ only |
GetMappedBone | FName | C++ only |
IsBoneMapped | bool | C++ only |
AutoMap | void | C++ only |
GuessBone / GuessTwistBone | FName | C++ only |
ClearMapping | void | C++ only |
GetValidationSummary | void | C++ only |
→ Full descriptions in Method details below.
Events
FOnAR51EditorBoneSelected OnEditorBoneSelected is a multicast delegate with signature (FName) that syncs bone selection across mapping-editor panels. It is not serialized and exists only to drive the in-editor mapping UI. Do not bind it from gameplay code.
Method details
GetTargetToSourceMappingTable
void GetTargetToSourceMappingTable(TMap<FName, FName>& Out) const;
Fills Out with the canonical AR 51 → target skeleton bone table. Mirrors the old UNodeMappingContainer API, so existing retarget code can read the mapping the same way.
GetMappedBone
FName GetMappedBone(FName CanonicalBone) const;
Resolves one canonical AR 51 bone to its target skeleton bone.
NAME_None if that canonical bone is not mappedIsBoneMapped
bool IsBoneMapped(FName CanonicalBone) const;
true if CanonicalBone has a target bone in BoneMapAutoMap
void AutoMap();
Auto-fills BoneMap and the forearm twist arrays from TargetSkeleton, using bone-name and hierarchy heuristics. This is the same action the mapping editor's auto-map button runs. Set TargetSkeleton first; AutoMap overwrites the existing mapping. After running it, confirm the result with GetValidationSummary — heuristics will miss non-standard bone names, which you then fix by hand.
// Build a mapping for a skeleton from C++ (e.g. an editor utility)
UAR51SkeletonMapping* Mapping = NewObject<UAR51SkeletonMapping>();
Mapping->TargetSkeleton = MySkeleton; // TSoftObjectPtr<USkeleton>
Mapping->AutoMap(); // best-effort fill from bone names + hierarchy
int32 Mapped, Missing, Invalid;
Mapping->GetValidationSummary(Mapped, Missing, Invalid);
if (Missing > 0 || Invalid > 0)
UE_LOG(LogTemp, Warning,
TEXT("AutoMap left %d missing / %d invalid bones — finish in the mapping editor"),
Missing, Invalid);
GuessBone
FName GuessBone(FName CanonicalBone) const;
FName GuessTwistBone(bool bLeft, int32 Index) const;
Best-guess helpers that the mapping editor uses to pre-fill a single field — they return a candidate target bone without modifying BoneMap. GuessBone proposes a target bone for one canonical bone; GuessTwistBone proposes the Index-th forearm twist bone for the left (bLeft = true) or right arm. Both return NAME_None if no plausible match is found.
GuessBone)true for the left forearm, false for the right (GuessTwistBone)GuessTwistBone)NAME_NoneClearMapping
void ClearMapping();
Empties BoneMap and the forearm twist arrays. TargetSkeleton is left untouched, so you can re-run AutoMap or re-author from scratch against the same skeleton.
GetValidationSummary
void GetValidationSummary(int32& OutMapped, int32& OutMissing, int32& OutInvalid) const;
Reports mapping health as three counts, so tooling can show a status badge or block use of a broken asset. A mapping is ready when OutMissing and OutInvalid are both 0.
TargetSkeletonint32 Mapped, Missing, Invalid;
Mapping->GetValidationSummary(Mapped, Missing, Invalid);
const bool bReady = (Missing == 0 && Invalid == 0);
UE_LOG(LogTemp, Log, TEXT("Mapping %s: %d mapped, %d missing, %d invalid"),
bReady ? TEXT("OK") : TEXT("INCOMPLETE"), Mapped, Missing, Invalid);
See also
UAR51Character— the mocap-driven mesh that consumes this mapping to retarget its skeletonAAR51CharacterActor— the character actor whoseUAR51Characteruses the mappingFBoneWeight— the bone + blend-weight entry stored in the twist arrays- Class index — all Unreal SDK types
- How-to: author a mapping asset → drive a character