增加纹理加载选项

This commit is contained in:
ww-rm
2025-06-12 23:47:46 +08:00
parent 28fd11cf3e
commit 9be77ba8bd
10 changed files with 104 additions and 62 deletions

View File

@@ -26,10 +26,11 @@ namespace Spine.Implementations.SpineWrappers.V36
private readonly ImmutableArray<IAnimation> _animations;
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
public SpineObjectData36(string skelPath, string atlasPath) : base(skelPath, atlasPath)
public SpineObjectData36(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
: base(skelPath, atlasPath, textureLoader)
{
// 加载 atlas
try { _atlas = new Atlas(atlasPath, _textureLoader); }
try { _atlas = new Atlas(atlasPath, textureLoader); }
catch (Exception ex) { throw new InvalidDataException($"Failed to load atlas '{atlasPath}'", ex); }
try