UBlendSpace::GetBlendSamples
#include "Animation/BlendSpace.h"
Access: public
Specifiers: constinline
Description
Returns the full array of blend samples (animation + sample position + rate scale) configured on this blend space asset.
Caveats & Gotchas
- • Returns the raw editor-authored sample list, not the runtime-weighted samples for a given blend input — use GetSamplesFromBlendInput for that.
- • The returned reference is only valid as long as the UBlendSpace isn't reallocated/garbage collected; don't cache it across frames.
Signature
const TArray<struct FBlendSample>& GetBlendSamples() const { return SampleData; } Return Type
const TArray<FBlendSample>& Example
Iterate configured samples C++
const TArray<FBlendSample>& Samples = MyBlendSpace->GetBlendSamples();
for (const FBlendSample& Sample : Samples)
{
UE_LOG(LogTemp, Log, TEXT("Sample anim: %s at (%f, %f)"), *GetNameSafe(Sample.Animation), Sample.SampleValue.X, Sample.SampleValue.Y);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?