RealDocs

FName::Number

property Core Since 4.0
#include "UObject/NameTypes.h"
Access: private

Description

The numeric suffix component of an FName stored internally as (public_number + 1) so that zero-initialised memory represents NAME_NO_NUMBER_INTERNAL. Use GetNumber() and SetNumber() to read and write it.

Caveats & Gotchas

  • Only present in memory when UE_FNAME_OUTLINE_NUMBER is 0. With outline numbers enabled (default since UE 5.1), the number is stored in a separate name-table entry and this field does not exist in the struct layout.
  • The raw field value is always one greater than the number that ToString() appends — directly inspecting it via memory debuggers will show a value one higher than expected.

Signature

uint32 Number;

Example

Read and modify the number suffix via accessors C++
FName SpawnedActor(TEXT("Actor"), 5); // displays as Actor_5
int32 Num = SpawnedActor.GetNumber(); // internal representation
SpawnedActor.SetNumber(NAME_EXTERNAL_TO_INTERNAL(10)); // now displays as Actor_10

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.