Merge remote-tracking branch 'origin/master' into gi
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
using Object = FlaxEngine.Object;
|
||||
|
||||
namespace FlaxEditor.Viewport.Previews
|
||||
{
|
||||
@@ -39,7 +41,7 @@ namespace FlaxEditor.Viewport.Previews
|
||||
|
||||
// Wait for base (don't want to async material parameters set due to async loading)
|
||||
if (baseMaterial == null || baseMaterial.WaitForLoaded())
|
||||
throw new FlaxException("Cannot load IES Profile preview material.");
|
||||
throw new Exception("Cannot load IES Profile preview material.");
|
||||
|
||||
// Create preview material (virtual)
|
||||
_previewMaterial = baseMaterial.CreateVirtualInstance();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using FlaxEngine;
|
||||
using Object = FlaxEngine.Object;
|
||||
|
||||
@@ -54,7 +55,7 @@ namespace FlaxEditor.Viewport.Previews
|
||||
if (instance == null)
|
||||
{
|
||||
_prefab = null;
|
||||
throw new FlaxException("Failed to spawn a prefab for the preview.");
|
||||
throw new Exception("Failed to spawn a prefab for the preview.");
|
||||
}
|
||||
|
||||
// Set instance
|
||||
|
||||
@@ -319,10 +319,10 @@ namespace FlaxEditor.Viewport.Previews
|
||||
// Create preview material (virtual)
|
||||
var baseMaterial = FlaxEngine.Content.LoadAsyncInternal<Material>("Editor/TexturePreviewMaterial");
|
||||
if (baseMaterial == null)
|
||||
throw new FlaxException("Cannot load texture preview material.");
|
||||
throw new Exception("Cannot load texture preview material.");
|
||||
_previewMaterial = baseMaterial.CreateVirtualInstance();
|
||||
if (_previewMaterial == null)
|
||||
throw new FlaxException("Failed to create virtual material instance for preview material.");
|
||||
throw new Exception("Failed to create virtual material instance for preview material.");
|
||||
|
||||
// Add widgets
|
||||
if (useWidgets)
|
||||
|
||||
Reference in New Issue
Block a user