From cd4975e58ed853d41b399cb734e27a73df9f4dd6 Mon Sep 17 00:00:00 2001 From: pfcDorn <> Date: Fri, 12 Jan 2024 15:45:11 +0100 Subject: [PATCH] fixed wrong placed variable declaration --- Runtime/Scripts/SceneImporter/ImporterTextures.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Scripts/SceneImporter/ImporterTextures.cs b/Runtime/Scripts/SceneImporter/ImporterTextures.cs index cdaa107e3..3ceceb371 100644 --- a/Runtime/Scripts/SceneImporter/ImporterTextures.cs +++ b/Runtime/Scripts/SceneImporter/ImporterTextures.cs @@ -197,6 +197,7 @@ async Task CheckMimeTypeAndLoadImage(GLTFImage image, Texture2D textu protected virtual async Task ConstructUnityTexture(Stream stream, bool markGpuOnly, bool isLinear, bool isNormal, GLTFImage image, int imageCacheIndex) { + bool convertToDxt5nmFormat = false; #if UNITY_EDITOR if (stream is AssetDatabaseStream assetDatabaseStream) { @@ -206,8 +207,7 @@ protected virtual async Task ConstructUnityTexture(Stream stream, bool markGpuOn _assetCache.ImageCache[imageCacheIndex] = tx; return; } - - bool convertToDxt5nmFormat = false; + if (isNormal && Context.SourceImporter != null) { BuildTargetGroup activeTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);