Components with spaces on their name doesn't get copied

If the name of an ActorComponent contains spaces, when the actor is copied in the editor, the component is not copied and the Output Log logs a warning about an unresolved reference.

I don’t know if FNames are supposed to contain spaces, but in case they aren’t, maybe the compiler should warn you.

Hi TS100101,

Do you have reproduction steps that I can follow to recreate this on my end? Thus far I have been unable to do so.

Hi .

Here’s a small project to reproduce the issue:

Just open the editor, drop a new TestActor to the level and then Alt-Drag it to duplicate the actor.

Now the duplicated actor shouldn’t have the USphereComponent.

If you change the component name from “Collision Sphere Component” to “CollisionSphereComponent” the issue should be fixed.

Hi TS100101,

The project you sent has no contents folder unfortunately. I did what I could to recreate the error but still did not reproduce it. Here is what I did, please let me know if any additional steps need to be taken:

  1. Open Editor (any project)
  2. New>Blueprint>Actor
  3. Open Components tab of blueprint
  4. Add static mesh component, Named “Cube Component”
  5. Added a second static mesh component parented to Cube Component called “Cylinder Component”
  6. Added a third Static Mesh Component parented under Cylinder Component and named it “Sphere Component with Long Name” (to test if multiple spaces caused the error)
  7. Compile, save, close blueprint
  8. Place blueprint in level
  9. Create copy of blueprint using alt+LMB.
  10. Repeated 9 several times.

Which version of the editor are you currently using?

Hi .

The project I sent you has a C++ class called TestActor inside the Source/BugTest folder, that’s all you need to reproduce the issue and that’s why there’s no content folder.
Just place the C++ class directly to the level.

BTW, I’m using 4.5.1 (didn’t tested with other versions).

Hi TS100101,

I was able to reproduce this and have entered a bug report, UE-5118 to be assessed by the development staff.

Great! Thank you .