Duplicating assets in level just uses the first asset with same name

Hi there,

I am sure there are many devs who already had to deal with this behavior and wonder why duplication in the level editor looks up the assets by name and not by an unique identifier/reference as you would expect.

But in between tons of posts about duplication I could find only this specific post. And even that is unanswered:

It is pretty easy to run into this issue, but only obvious if

  • you have changed a copied asset
    before using it. (You need to change
    something obvious (material) and not
    just some internal logic.)
  • you just
    named a new different looking asset
    like another one…
  • you feel the need
    of checking the OutputLog while
    duplicating. Or you figure
    out what this warning was about later
    on. (“LogUObjectHash:Warning:
    Ambiguous search, could be
    StaticMeshComponent … or …”)

So it looks more like “as is” than a bug. but since it’s certainly not a feature, and the warning is actually an error, I post this as bug report. I am sure there are already reports about this, but I hope this showcase will help people to figure out and solve/avoid some situations. :slight_smile:

1: Create a new blank project (Tested with 4.10.4 and 4.11.P6)

2: Drag a cube into the level

3: Convert the cube into Blueprint

4: Create a new folder (My usecase: test-folder with level for/with different configured MeshActor copies.)

5: Drag the StaticMeshActor blueprint of the cube into the folder and copy (Do not rename the new copy because this would fix the problem :wink: )

6: Just for showcase: Edit the blueprint. E.g. clear the material.

7: Drag this copy into the level

8: Now ctrl+w/copypase/alt+drag this StaticMeshActor in the level.

Result: You actually duplicate the original StaticMeshActor.

Fortunately I always select the blueprint in the Contentbrowser to edit. But if you edit the blueprint by selecting a level actor, it’s up to you what that means when you think you work on the (test-) copy.

More obvious:

9: Drag a sphere into the level

10: convert the sphere into Blueprint - Give it the name of a StaticMeshBlueprint from before (in a different folder of course).

11: Duplicate the Sphere => You will get a Cube.

In my case I just handcrafted a fractal structure with 2400 MeshBPs cubes up to this point (just few minutes alt-drag and grouping). I was surprised to see that only the initial part changed the material afterwards ^^
“Replace selected Actors with” works fine, but then you lose the groupings.

I hope no one has some real serious situation with this :slight_smile:

Would be nice if this could be “supported/fixed” and not just a warning in the log :slight_smile:

Happy debugging :slight_smile:

Marooney

Hello,

I have been able to reproduce your issue, and have entered a bug report (UE-28048). Thank you for your report. I will provide updates on this issue as they become available.

Have a great day