Skip to content

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

FieldTypeContract
ProfileIdentifierFNameStable identifier for the authored profile. It must be set, but it does not participate in primary asset identity.
DisplayNameFTextLocalized label for editor UI, diagnostics, and tooling. It must be non-empty.
DescriptionFTextOptional localized description. An empty description is a warning, not an error.

Read APIs

FunctionReturnsUse
ValidateProfile(TArray<FMotionProfileValidationMessage>& OutMessages)boolValidates the base profile details and the subclass-specific profile fields.
GetPrimaryAssetId()FPrimaryAssetIdReturns 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:

TypeFields or values
EMotionProfileValidationSeverityError, Warning
FMotionProfileValidationMessageSeverity, 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:

RuleSeverity
ProfileIdentifier is NoneError
DisplayName is emptyError
Description is emptyWarning

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.

Motion - Advanced First Person Character Controller