I just update my spine to 3.7.32 to use the miltiple-skins new feature.
http://zh.esotericsoftware.com/forum/Multiple-skins-in-editor-ETA-10749
After exporting my spine Json file.The GetRepackedSkin
function in AttachmentTools
run into an error.
While using spine-unity 3.6 the error is:
Texture rectangle is out of bounds (-55 < 0)
UnityEngine.Texture2D:GetPixels(Int32, Int32, Int32, Int32)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:ToTexture(AtlasRegion, Boolean, TextureFormat, Boolean) (at Assets/Spine/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:600)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:GetRepackedSkin(Skin, String, Shader, Material&, Texture2D&, Int32, Int32, TextureFormat, Boolean, Material, Boolean, Boolean) (at Assets/Spine/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:517)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:GetRepackedSkin(Skin, String, Material, Material&, Texture2D&, Int32, Int32, TextureFormat, Boolean, Boolean) (at Assets/Spine/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:484)
Then I switch spine-unity runtime to 3.7 the error becomes:
Graphics.CopyTexture called with negative region coordinate or size (srcX 894, srcY -55, srcWidth 106, srcHeight 62, dstX 0, dstY 0)
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Int32, Int32, Int32, Int32, Texture, Int32, Int32, Int32, Int32)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:CopyTexture(Texture2D, Rect, Texture2D) (at Assets/Spine/Runtime/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:628)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:ToTexture(AtlasRegion, TextureFormat, Boolean) (at Assets/Spine/Runtime/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:599)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:GetRepackedSkin(Skin, String, Shader, Material&, Texture2D&, Int32, Int32, TextureFormat, Boolean, Material, Boolean, Boolean) (at Assets/Spine/Runtime/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:517)
Spine.Unity.Modules.AttachmentTools.AtlasUtilities:GetRepackedSkin(Skin, String, Material, Material&, Texture2D&, Int32, Int32, TextureFormat, Boolean, Boolean) (at Assets/Spine/Runtime/spine-unity/Modules/AttachmentTools/AttachmentTools.cs:484)
Maybe the Json output file doesn't fit both 2 version runtimes, just because the project generated with 3.6 then updated to 3.7?