From 51976b7c55086f8bc0d7d9c3995a7b8145a07019 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 26 May 2024 05:38:32 -0700 Subject: [PATCH] fix: Remove unnessesary disposal of a NativeArray to fix a tileset import exception in older unity versions --- .../ScriptedImporter/LDtkTilesetImporter_TextureGeneration.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/LDtkUnity/Editor/ScriptedImporter/LDtkTilesetImporter_TextureGeneration.cs b/Assets/LDtkUnity/Editor/ScriptedImporter/LDtkTilesetImporter_TextureGeneration.cs index e4d45e24..2e9879e0 100644 --- a/Assets/LDtkUnity/Editor/ScriptedImporter/LDtkTilesetImporter_TextureGeneration.cs +++ b/Assets/LDtkUnity/Editor/ScriptedImporter/LDtkTilesetImporter_TextureGeneration.cs @@ -57,8 +57,7 @@ private bool PrepareAndGenerateTexture(TextureImporterPlatformSettings platformS LDtkProfiler.BeginSample("handle.Complete"); handle.Complete(); LDtkProfiler.EndSample(); - - job.Pixels.Dispose(); + _validIds = job.TileIdsWithPixels; //GOAL: prepare only the sprites that matter for the texture generation