Components name in parenthesis

Why the components repeat text in parenthesis in blueprints if I’m following the lesson and copy the same code:

In blueprint
CapsuleComp(Capsule Collider)(inherit)
->BaseMesh(Base Mesh)(inherit)

In c++
CapsuleComp = CreateDefaultSuboject(TEXT(“Capsule Collider”));
BaseMesh = CreateDefaultSuboject(TEXT(“Base Mesh”));

The name you give for CreateDefaultSubobject is for the name of the component which will be used for reflection and serialisation. It’s a little confusing that it’s not also the name used in the editor :man_shrugging:.

Thank you for your reply, but I’m also confused, what should I do to keep blueprint components names clean? If I omit TEXT it will cause compile errors.

Could you expand on that?

For example I’d like in blueprints components be named:

CapsuleComp(inherit) not:

CapsuleComp(Capsule Collider)(inherit)

When I follow the lesson as it is

CapsuleComp = CreateDefaultSubobject(TEXT(“Capsule Collider”));

Oh right that. Not sure if you can to be honest.

I wonder how the lesson instructor did that :thinking:

That would be a difference in engine version.

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

Privacy & Terms