Skip to main content

UAR51SkeletonMapping

UCLASS · UDataAsset BlueprintType data asset
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.

How-to

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).

PropertyTypeDefaultDescription
Mapping
TargetSkeletonTSoftObjectPtr<USkeleton>the skeleton this mapping targets; drives the editor bone picker
BoneMapTMap<FName,FName>canonical AR 51 bone name → target skeleton bone name
Twist
LeftForearmTwistBonesTArray<FBoneWeight>left forearm twist bones + blend weights (Category …|Twist)
RightForearmTwistBonesTArray<FBoneWeight>right forearm twist bones + blend weights (Category …|Twist)
Editor
EditorSelectedBoneFNameNAME_NoneTransient — editor-only selection channel; not serialized

Method summary

Instance — all plain C++ (no UFUNCTION).

MethodReturns
GetTargetToSourceMappingTablevoidC++ only
GetMappedBoneFNameC++ only
IsBoneMappedboolC++ only
AutoMapvoidC++ only
GuessBone / GuessTwistBoneFNameC++ only
ClearMappingvoidC++ only
GetValidationSummaryvoidC++ only

→ Full descriptions in Method details below.

Events

Editor only — not for game runtime

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

methodC++ only
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.

Parameters
OutTMap<FName, FName>&receives the canonical → target bone pairs (cleared/overwritten by the call)

GetMappedBone

methodC++ only
FName GetMappedBone(FName CanonicalBone) const;

Resolves one canonical AR 51 bone to its target skeleton bone.

Parameters
CanonicalBoneFNamea canonical AR 51 bone name
ReturnsFNamethe mapped target bone, or NAME_None if that canonical bone is not mapped

IsBoneMapped

methodC++ only
bool IsBoneMapped(FName CanonicalBone) const;
Parameters
CanonicalBoneFNamea canonical AR 51 bone name
Returnsbooltrue if CanonicalBone has a target bone in BoneMap

AutoMap

methodC++ only
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.

Exampleinferred
// 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

methodC++ only
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.

Parameters
CanonicalBoneFNamecanonical AR 51 bone to find a candidate for (GuessBone)
bLeftbooltrue for the left forearm, false for the right (GuessTwistBone)
Indexint32twist-chain position, from base outward (GuessTwistBone)
ReturnsFNamethe guessed target bone, or NAME_None

ClearMapping

methodC++ only
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

methodC++ only
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.

Parameters
OutMappedint32&canonical bones with a valid target bone
OutMissingint32&canonical bones with no target assigned
OutInvalidint32&entries whose target bone is not present on TargetSkeleton
Exampleinferred
int32 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

Was this page helpful?