From 2095ab4109b1d4683f7c2a5c361d56775d37a2ac Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 25 May 2022 17:51:58 +0200 Subject: [PATCH] fix: Compilation with older C# versions. --- Runtime/Scripts/GltfImport.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Scripts/GltfImport.cs b/Runtime/Scripts/GltfImport.cs index e020037f..b9696440 100644 --- a/Runtime/Scripts/GltfImport.cs +++ b/Runtime/Scripts/GltfImport.cs @@ -1094,9 +1094,9 @@ void LoadImage( int imageIndex, Uri url, bool nonReadable, bool isKtx ) { return; #endif // KTX_UNITY } else { - TextureDownloadBase downloadTask = LoadImageFromBytes(imageIndex) - ? new TextureDownload(downloadProvider.Request(url)) - : new TextureDownload(downloadProvider.RequestTexture(url,nonReadable)); + var downloadTask = LoadImageFromBytes(imageIndex) + ? (TextureDownloadBase) new TextureDownload(downloadProvider.Request(url)) + : (TextureDownloadBase) new TextureDownload(downloadProvider.RequestTexture(url,nonReadable)); if(textureDownloadTasks==null) { textureDownloadTasks = new Dictionary(); }