Fix UIControl invalid showing in prefab window using nested prefab with UI

This commit is contained in:
Wojtek Figat
2021-03-17 19:25:12 +01:00
parent 675bb93fd5
commit df497bf684

View File

@@ -199,6 +199,11 @@ namespace FlaxEngine
// Don't link disabled actors
if (!IsActiveInHierarchy)
return null;
#if FLAX_EDITOR
// Prefab editor doesn't fire BeginPlay so for disabled actors we don't unlink them so do it here
if (!IsActive)
return null;
#endif
var parent = Parent;
if (parent is UIControl uiControl && uiControl.Control is ContainerControl uiContainerControl)