diff --git a/spine-unity/Modules/com.esotericsoftware.spine.on-demand-loading/Editor/GenericOnDemandTextureLoaderInspector.cs b/spine-unity/Modules/com.esotericsoftware.spine.on-demand-loading/Editor/GenericOnDemandTextureLoaderInspector.cs index 50ce4aceb..f9168ce72 100644 --- a/spine-unity/Modules/com.esotericsoftware.spine.on-demand-loading/Editor/GenericOnDemandTextureLoaderInspector.cs +++ b/spine-unity/Modules/com.esotericsoftware.spine.on-demand-loading/Editor/GenericOnDemandTextureLoaderInspector.cs @@ -374,7 +374,12 @@ namespace Spine.Unity.Editor { public void DeletePlaceholderTextures (GenericOnDemandTextureLoader loader) { foreach (var materialMap in loader.placeholderMap) { - Texture texture = materialMap.textures[0].placeholderTexture; + var textures = materialMap.textures; + if (textures == null || textures.Length == 0) { + continue; + } + + Texture texture = textures[0].placeholderTexture; if (texture) AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(texture)); }