World UI Widgets are not removed with .RemoveFromParent when they are sub-entities of prefabs

Summary

If you instantiate an entity prefab that has a child entity that’s a Widget entity, when you call RemoveFromParent() on the prefab, the widget isn’t removed from the world. In edit session, the only way to remove it is to change session.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Scene Graph

Steps to Reproduce

Create an entity prefab, add a mesh component to it.
Create a widget, add an image to it. Compile verse and add the corresponding entity of the widget to the prefab.
In verse, make a simple code that instantiates the prefab, adds it to the simulation and then removes it after some time.

Expected Result

The whole entity prefab is removed from the world.

Observed Result

Only the mesh component is removed. The widget entity stays in the world.

Platform(s)

windows

Upload an image

Additional Notes

Image 1 and 2 show the setup that doesn’t work.

Recreating the prefab in code at runtime works, and the widget is removed correctly.
Image 3 shows the function that works.

Noticed this too i added direct to the sim entity and it works too so its something with a premade prefab.

2 Likes

Yeah the issue is with prefabs. Not the first time they cause issues when instantiated. Maybe SetPresentableToPlayers can interfere as well? Did you use it?

I didnt use this no

Ok so then it might not have to do with this bug

FORT-1152311 has been created and its status is ‘Unconfirmed’. This is now in a queue to be reproduced and confirmed.