Fix missing UICanvas linkage in prefab preview

#218
This commit is contained in:
Wojtek Figat
2021-03-17 11:12:08 +01:00
parent 4eeadf87fb
commit 8fb27e6f83
4 changed files with 35 additions and 0 deletions

View File

@@ -121,6 +121,18 @@ namespace FlaxEditor.Viewport.Previews
{
}
/// <inheritdoc />
public override void Update(float deltaTime)
{
base.Update(deltaTime);
if (_instance != null)
{
// Link UI canvases to the preview (eg. after canvas added to the prefab)
LinkCanvas(_instance);
}
}
/// <inheritdoc />
public override void OnDestroy()
{