UKismetSystemLibrary::AddFloatHistorySample
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Appends a new value to an FDebugFloatHistory sample buffer and returns the updated copy, feeding the debug float-history draw calls.
Caveats & Gotchas
- • Returns a new struct by value rather than mutating in place — you must reassign the result to your stored history variable or samples will be lost.
- • FDebugFloatHistory internally caps the number of retained samples and min/max range; very old samples are dropped as new ones are added.
- • Has no effect on gameplay logic on its own; it only exists to build data for DrawDebugFloatHistoryLocation/Transform.
Signature
static FDebugFloatHistory AddFloatHistorySample(float Value, const FDebugFloatHistory& FloatHistory) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Value | float | The new sample to append to the history. | — |
| FloatHistory | const FDebugFloatHistory& | The existing history struct to append to. | — |
Return Type
FDebugFloatHistory Example
Accumulate samples each tick C++
SpeedHistory = UKismetSystemLibrary::AddFloatHistorySample(GetVelocity().Size(), SpeedHistory); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?