Appearance
Component profile API reference
This page documents the shared UMotionComponentProfile contract. The Motion walk, sprint, crouch, jump, breathing, movement sound, and camera profiles use this contract. For the authoring workflow, see Component profiles.
Profile role
UMotionComponentProfile is the UPrimaryDataAsset base class for Motion component defaults. Components validate profiles during setup and copy applicable component-owned runtime values. Profile assignment is not a live loadout swap.
Metadata fields
| Field | Type | Contract |
|---|---|---|
ProfileIdentifier | FName | Stable identifier for the authored profile. It must be set, but it does not participate in primary asset identity. |
DisplayName | FText | Localized label for editor UI, diagnostics, and tooling. It must be non-empty. |
Description | FText | Optional localized description. An empty description is a warning, not an error. |
Read APIs
| Function | Returns | Use |
|---|---|---|
ValidateProfile(TArray<FMotionProfileValidationMessage>& OutMessages) | bool | Validates the base profile details and the subclass-specific profile fields. |
GetPrimaryAssetId() | FPrimaryAssetId | Returns a primary asset ID. The type is the concrete profile class name. The name is the profile asset object name. Profiles can share ProfileIdentifier. Different asset object names produce different asset IDs. |
Read DisplayName, Description, and ProfileIdentifier directly to get profile details in tooling.
Validation messages
ValidateProfile writes diagnostics into FMotionProfileValidationMessage:
| Type | Fields or values |
|---|---|
EMotionProfileValidationSeverity | Error, Warning |
FMotionProfileValidationMessage | Severity, Message |
Severity defaults to Error. Message is an FText so validation output can be displayed in localized editor and Blueprint-facing tools.
ValidateProfile clears OutMessages at the start of each call. Then, it adds validation messages for the current profile. It returns false when one or more messages have EMotionProfileValidationSeverity::Error. The function returns warnings to the caller, but warnings do not make the profile invalid.
The base UMotionComponentProfile validation rules are:
| Rule | Severity |
|---|---|
ProfileIdentifier is None | Error |
DisplayName is empty | Error |
Description is empty | Warning |
Profile subclasses add behavior-specific checks. Examples include necessary GameplayEffect references, necessary curve assets, numeric limits, and warnings for runtime playback state in authored FMotionCurve values.
Example validation check
cpp
TArray<FMotionProfileValidationMessage> Messages;
const bool bValid = Profile->ValidateProfile(Messages);
for (const FMotionProfileValidationMessage& Message : Messages)
{
const TCHAR* SeverityText =
Message.Severity == EMotionProfileValidationSeverity::Error
? TEXT("error")
: TEXT("warning");
UE_LOG(LogTemp, Log, TEXT("Profile %s: %s"),
SeverityText,
*Message.Message.ToString());
}
if (!bValid)
{
// Block setup or disable the affected behavior.
}Components use the same error and warning difference when they do a check of assigned profiles. Errors block a valid setup. Warnings remain visible diagnostics.