I have a function in my code that creates a UStaticMeshComponent in the Actor’s constructor.
VisualMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
And it’s works perfect. But as soon as I change name to something else, it stops working. The object stops creating its own Mesh. For example:
// NOT WORKING
VisualMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("StaticMesh"));
Can you tell me where I`m wrong?