Fix UI Canvas visible in PrefabPreview when using IsActive

#559
This commit is contained in:
Wojtek Figat
2021-06-30 12:02:23 +02:00
parent 72599b18ce
commit c4fc7b7e5d

View File

@@ -643,7 +643,7 @@ namespace FlaxEngine
#if FLAX_EDITOR
if (RenderMode == CanvasRenderMode.ScreenSpace && _editorRoot != null && _guiRoot != null)
{
_guiRoot.Parent = HasParent && IsActiveInHierarchy ? _editorRoot : null;
_guiRoot.Parent = IsActiveInHierarchy ? _editorRoot : null;
_guiRoot.IndexInParent = 0;
}
#endif
@@ -693,7 +693,7 @@ namespace FlaxEngine
{
if (RenderMode == CanvasRenderMode.ScreenSpace && _editorRoot != null && _guiRoot != null)
{
_guiRoot.Parent = HasParent && IsActiveInHierarchy ? _editorRoot : null;
_guiRoot.Parent = IsActiveInHierarchy ? _editorRoot : null;
_guiRoot.IndexInParent = 0;
}
}