RealDocs

UBlendSpace::GetBlendSample

function Engine Since 4.0
#include "Animation/BlendSpace.h"
Access: public Specifiers: const

Description

Returns the blend sample at the given index. Check GetBlendSamples().Num() to know the valid range first.

Caveats & Gotchas

  • Will assert (crash in debug/development builds) on an out-of-range index rather than returning a safe default — always bounds-check first.
  • Index order matches authoring order in the editor grid, which is not guaranteed to correlate with spatial position.

Signature

ENGINE_API const struct FBlendSample& GetBlendSample(const int32 SampleIndex) const;

Parameters

Name Type Description Default
SampleIndex const int32 Index into the sample array to fetch.

Return Type

const FBlendSample&

Example

Safe indexed access C++
const int32 NumSamples = MyBlendSpace->GetBlendSamples().Num();
if (SampleIndex >= 0 && SampleIndex < NumSamples)
{
	const FBlendSample& Sample = MyBlendSpace->GetBlendSample(SampleIndex);
	// use Sample.Animation, Sample.SampleValue
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.