Number increasing in the name of a child actor

Hi,
I have blueprint actor, which is based on cpp class. And inside of this cpp class I created a child actor component

ACPP_Grid::ACPP_Grid()
{
 	
	PrimaryActorTick.bCanEverTick = false;
    SceneRoot = CreateDefaultSubobject<USceneComponent>(TEXT("DefaultSceneRoot"));
    SetRootComponent(SceneRoot);
   
       CA_GridVisual = CreateDefaultSubobject<UChildActorComponent>(TEXT("Grid Visual"));
       CA_GridVisual->SetEditorTreeViewVisualizationMode(EChildActorComponentTreeViewVisualizationMode::ChildActorOnly);
       CA_GridVisual->SetupAttachment(SceneRoot);
       CA_GridVisual->SetChildActorClass(ACPP_GridVisual::StaticClass());
}

And there is a problem. Every time when I compile my blueprint actor class based on that cpp class, number inside the name of a child actor increases.
Number mason

Is this normal or did I do something wrong?

Hi DDenny,

That’s normal, it’s to ensure all objects have unique names.

Hmm, ok. But…Won’t it be bad later when the numbers get big? They can’t grow endlessly for sure

The numbers shouldn’t be an issue - they can get pretty big if you have a lot of objects in your level, but I’m guess the number is powered by an int32 which gives millions of numbers - the level couldn’t handle that many… You can rename them - just make sure the name is unique.

For Actors, you also have a “Label” which can be the same as other actors…

Well, I hope it will not do any bad joke with me in future. Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.