UBehaviorTreeComponent::SetCSVTickStatName
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: inline
Description
Sets a custom CSV profiler stat name to attribute this behavior tree component's tick cost to in CSV profiling captures, instead of a generic default label.
Caveats & Gotchas
- • Only compiled when CSV_PROFILER_STATS is enabled — the method doesn't exist in builds without CSV profiling, so guard call sites with the same #if if compiling for multiple configurations.
- • The passed string must be a static/persistent string (e.g. a string literal), since the profiler stores the pointer rather than copying the string.
- • Purely a profiling/diagnostics aid — has no effect on behavior tree logic or timing.
Signature
void SetCSVTickStatName(const char* InCSVTickStatName) { CSVTickStatName = InCSVTickStatName; } Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InCSVTickStatName | const char* | Static string used as the CSV profiler stat name for this component's ticks. | — |
Return Type
void Example
Tag a BT component for CSV profiling C++
#if CSV_PROFILER_STATS
BehaviorTreeComponent->SetCSVTickStatName("BossAI_BehaviorTree");
#endif See Also
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?