From 4fb96bb24fc00f9f76085ba485e1ab3dd54f77e2 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 27 Feb 2024 10:14:50 +0100 Subject: [PATCH 1/4] [godot] Make repository url configurable in setup.sh, see #2463 --- spine-godot/build/setup.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/spine-godot/build/setup.sh b/spine-godot/build/setup.sh index d18b07dc3..f5e5542c0 100755 --- a/spine-godot/build/setup.sh +++ b/spine-godot/build/setup.sh @@ -4,12 +4,13 @@ set -e dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" pushd "$dir" > /dev/null -if [ $# -lt 2 ] || [ $# -gt 3 ]; then - echo "Usage: ./setup.sh ?" +if [ $# -lt 2 ] || [ $# -gt 4 ]; then + echo "Usage: ./setup.sh ? ?" echo echo "e.g.:" - echo " ./setup.sh 3.5.2-stable true" + echo " ./setup.sh 4.1.3-stable true" echo " ./setup.sh master false true" + echo " ./setup.sh master false false https://github.com/my-github-username/godot.git" echo echo "Note: the 'mono' parameter only works for Godot 4.x+!" @@ -19,6 +20,7 @@ fi branch=${1%/} dev=${2%/} mono=false +repo=https://github.com/godotengine/godot.git if [[ $# -eq 3 && "$branch" != 3* ]]; then mono=${3%/} @@ -34,10 +36,13 @@ if [ "$mono" != "true" ] && [ "$mono" != "false" ]; then exit 1 fi +if [ $# -eq 4 ]; then + repo=${4%/} +fi pushd .. rm -rf godot -git clone --depth 1 https://github.com/godotengine/godot.git -b $branch +git clone --depth 1 $repo -b $branch if [ $dev = "true" ]; then cp -r .idea godot cp build/custom.py godot From 5edc53f2b0610cb52c0f79d1877fffc9fd542a63 Mon Sep 17 00:00:00 2001 From: Kaisei Date: Wed, 6 Mar 2024 11:27:13 +0900 Subject: [PATCH 2/4] [flutter] Fix missing definition of Blend mode set function (#2458) * Fix skeleton.getY() and skeleton.getScaleY() * [flutter] Fix missing definition of Blend mode set function. --- spine-flutter/src/spine_flutter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spine-flutter/src/spine_flutter.cpp b/spine-flutter/src/spine_flutter.cpp index 3f2e42e77..4af4b6635 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; From 8e200efdbb2c69e877d49a11dd02a1a73ac25195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A1n=20Trung=20Ki=C3=AAn?= Date: Wed, 6 Mar 2024 09:43:09 +0700 Subject: [PATCH 3/4] flutter: fix memory cleanup is slow due to not destroying shaders (#2470) --- spine-flutter/lib/spine_flutter.dart | 5 +++++ 1 file changed, 5 insertions(+) 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(); + }); + } } } From 795fb920800bdd62e018dca41a00ae1a5c67fce1 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 7 Mar 2024 16:04:43 +0100 Subject: [PATCH 4/4] [unity] Fixed SkeletonBinary hash `{"` accidentally being detected as json. Closes #2474. --- .../spine-unity/Asset Types/SkeletonDataCompatibility.cs | 6 ++++++ spine-unity/Assets/Spine/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 1898dae4a..1b9d68b62 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 22e6a9449..45c7dccac 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.1.37", + "version": "4.1.38", "unity": "2018.3", "author": { "name": "Esoteric Software",