Appearance
Component profile API reference
This page documents the shared UMotionComponentProfile contract used by Motion's walk, sprint, crouch, jump, breathing, movement sound, and camera profiles. 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 component-owned runtime values as needed. 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 whose type is the concrete profile class name and whose name is the profile asset's object name. Profiles can share ProfileIdentifier; distinct asset object names produce distinct asset ids. |
Read DisplayName, Description, and ProfileIdentifier directly when tooling needs profile details.
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, adds validation messages for the current profile, and returns false when any message has EMotionProfileValidationSeverity::Error. Warnings are returned to the caller but 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 extend this with behavior-specific checks. Examples include required GameplayEffect references, required curve assets, positive and non-negative numeric bounds, and warnings when authored FMotionCurve values contain runtime playback state.
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 this same error-vs-warning distinction when checking assigned profiles: errors block valid setup, while warnings remain visible diagnostics.