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
a8f400b9bf
commit
75a1003b8c
@ -264,6 +264,10 @@ namespace Spine.Unity {
|
|||||||
System.Action<Texture> onTextureLoaded) {
|
System.Action<Texture> onTextureLoaded) {
|
||||||
|
|
||||||
PlaceholderTextureMapping[] placeholderTextures = placeholderMap[materialIndex].textures;
|
PlaceholderTextureMapping[] placeholderTextures = placeholderMap[materialIndex].textures;
|
||||||
|
if (placeholderTextures == null || textureIndex >= placeholderTextures.Length) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
TargetReference targetReference = placeholderTextures[textureIndex].targetTextureReference;
|
TargetReference targetReference = placeholderTextures[textureIndex].targetTextureReference;
|
||||||
loadedDataAtMaterial[materialIndex].lastFrameRequested = Time.frameCount;
|
loadedDataAtMaterial[materialIndex].lastFrameRequested = Time.frameCount;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user