mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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) {
|
public void DeletePlaceholderTextures (GenericOnDemandTextureLoader<TargetReference, TextureRequest> loader) {
|
||||||
foreach (var materialMap in loader.placeholderMap) {
|
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)
|
if (texture)
|
||||||
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(texture));
|
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(texture));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user