diff --git a/spine-flutter/lib/spine_flutter.dart b/spine-flutter/lib/spine_flutter.dart index a5fdd51eb..af096f744 100644 --- a/spine-flutter/lib/spine_flutter.dart +++ b/spine-flutter/lib/spine_flutter.dart @@ -183,6 +183,11 @@ class Atlas { for (final image in atlasPages) { image.dispose(); } + for (final map in atlasPagePaints) { + map.values.forEach((element) { + element.shader?.dispose(); + }); + } } } diff --git a/spine-flutter/src/spine_flutter.cpp b/spine-flutter/src/spine_flutter.cpp index d6441abea..a8be43800 100644 --- a/spine-flutter/src/spine_flutter.cpp +++ b/spine-flutter/src/spine_flutter.cpp @@ -1863,6 +1863,12 @@ spine_blend_mode spine_slot_data_get_blend_mode(spine_slot_data slot) { return (spine_blend_mode) _slot->getBlendMode(); } +void spine_slot_data_set_blend_mode(spine_slot_data slot, spine_blend_mode blendMode) { + if (slot == nullptr) return; + SlotData *_slot = (SlotData *) slot; + _slot->setBlendMode((BlendMode) blendMode); +} + // Slot void spine_slot_set_to_setup_pose(spine_slot slot) { if (slot == nullptr) return; diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs index 421eecd31..d9e2b72eb 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataCompatibility.cs @@ -163,6 +163,12 @@ namespace Spine.Unity { public static bool IsJsonFile (TextAsset file) { byte[] content = file.bytes; + + // check for binary skeleton version number string, starts after 8 byte hash + char majorVersionChar = compatibleBinaryVersions[0][0].ToString()[0]; + if (content.Length > 10 && content[9] == majorVersionChar && content[10] == '.') + return false; + const int maxCharsToCheck = 256; int numCharsToCheck = Math.Min(content.Length, maxCharsToCheck); int i = 0; diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index f6200d591..23f530845 100644 --- a/spine-unity/Assets/Spine/package.json +++ b/spine-unity/Assets/Spine/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity", "displayName": "spine-unity Runtime", "description": "This plugin provides the spine-unity runtime core.", - "version": "4.2.53", + "version": "4.2.54", "unity": "2018.3", "author": { "name": "Esoteric Software",