mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
Fix for IndexOutOfRangeException: Index was outside the bounds of the array
This commit is contained in:
parent
41e493b7c3
commit
0a3b5dbb31
@ -374,7 +374,12 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
public void DeletePlaceholderTextures (GenericOnDemandTextureLoader<TargetReference, TextureRequest> 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));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user