From 7ea2f19836fb99381d31f8403e1b2852f02fc359 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 1 Mar 2021 17:27:00 +0100 Subject: [PATCH 1/3] [unity] GetRemappedClone caused incorrect results at 270 degree roated MeshAttachments. See #1847. --- .../Runtime/spine-unity/Utility/AttachmentRegionExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AttachmentRegionExtensions.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AttachmentRegionExtensions.cs index 580b0ae68..6e786019a 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AttachmentRegionExtensions.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AttachmentRegionExtensions.cs @@ -95,6 +95,7 @@ namespace Spine.Unity.AttachmentTools { attachment.RegionU2 = region.u2; attachment.RegionV2 = region.v2; attachment.RegionRotate = region.rotate; + attachment.RegionDegrees = region.degrees; attachment.regionOffsetX = region.offsetX; attachment.regionOffsetY = region.offsetY; attachment.regionWidth = region.width; From dc6a0233f3ec024616a80300e2706af7f287ab9b Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 2 Mar 2021 13:52:26 +0100 Subject: [PATCH 2/3] [unity] minor 4.0 changelog update, added line regarding `BoneFollower` and `BoneFollowerGraphic` improvements from 3.8 to 4.0 section as well. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc775e379..192aac86d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ * All `Sprite` shaders (including URP and LWRP extension packages) now provide an additional `Fixed Normal Space` option `World-Space`. PReviously options were limited to `View-Space` and `Model-Space`. * `SkeletonGraphic` now fully supports [`SkeletonUtility`](http://esotericsoftware.com/spine-unity#SkeletonUtility) for generating a hierarchy of [`SkeletonUtilityBones`](http://esotericsoftware.com/spine-unity#SkeletonUtilityBone) in both modes `Follow` and `Override`. This also enables creating hinge chain physics rigs and using `SkeletonUtilityConstraints` such as `SkeletonUtilityGroundConstraint` and `SkeletonUtilityEyeConstraint` on `SkeletonGraphic`. * Added **native support for slot blend modes** `Additive`, `Multiply` and `Screen` with automatic assignment at newly imported skeleton assets. `BlendModeMaterialAssets` are now obsolete and replaced by the native properties at `SkeletonDataAsset`. The `SkeletonDataAsset` Inspector provides a new `Blend Modes - Upgrade` button to upgrade an obsolete `BlendModeMaterialAsset` to the native blend modes properties. This upgrade will be performed automatically on imported and re-imported assets. + * `BoneFollower` and `BoneFollowerGraphic` components now provide better support for following bones when the skeleton's Transform is not the parent of the follower's Transform. Previously e.g. rotating a common parent Transform did not lead to the desired result, as well as negatively scaling a skeleton's Transform when it is not a parent of the follower's Transform. * **Changes of default values** From b5a7601a41c316ac7c77e8fef1229c2c13627423 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 2 Mar 2021 15:57:28 +0100 Subject: [PATCH 3/3] [unity] Fixed atlas asset problems after re-export with latest 4.0 Spine Editor beta version. --- examples/export/runtimes.sh | 4 ++-- .../Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt | 4 ++-- .../Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json | 2 +- .../Spine/Runtime/spine-unity/Asset Types/SpineAtlasAsset.cs | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/export/runtimes.sh b/examples/export/runtimes.sh index 16badb369..0435907a4 100755 --- a/examples/export/runtimes.sh +++ b/examples/export/runtimes.sh @@ -445,9 +445,9 @@ UNITY_TARGET_DIR="$ROOT/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon cp -f ../dragon/export/dragon-ess.json "$UNITY_TARGET_DIR/dragon.json" cp -f ../dragon/export/dragon-pma.atlas "$UNITY_TARGET_DIR/dragon.atlas.txt" sed -i 's/dragon-pma.png/dragon.png/g' "$UNITY_TARGET_DIR/dragon.atlas.txt" -sed -i 's/dragon-pma2.png/dragon2.png/g' "$UNITY_TARGET_DIR/dragon.atlas.txt" +sed -i 's/dragon-pma_2.png/dragon2.png/g' "$UNITY_TARGET_DIR/dragon.atlas.txt" cp -f ../dragon/export/dragon-pma.png "$UNITY_TARGET_DIR/dragon.png" -cp -f ../dragon/export/dragon-pma2.png "$UNITY_TARGET_DIR/dragon2.png" +cp -f ../dragon/export/dragon-pma_2.png "$UNITY_TARGET_DIR/dragon2.png" UNITY_TARGET_DIR="$ROOT/spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins" cp -f ../goblins/export/goblins-pro.json "$UNITY_TARGET_DIR/goblins.json" diff --git a/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt b/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt index 71e7d2b3e..8e0e4e741 100644 --- a/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt +++ b/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt @@ -1,4 +1,4 @@ -dragon-pma.png +dragon.png size: 1024, 1024 filter: Linear, Linear pma: true @@ -87,7 +87,7 @@ tail06 thiagobrayner bounds: 54, 912, 350, 31 -dragon-pma2.png +dragon2.png size: 1024, 512 filter: Linear, Linear pma: true diff --git a/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json b/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json index 1f84045c7..a83cd7d1c 100644 --- a/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json +++ b/spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json @@ -1,7 +1,7 @@ { "skeleton": { "hash": "UIFpNNbbcQI", - "spine": "4.0.58-beta", + "spine": "4.0.59-beta", "x": -366.31, "y": -286.62, "width": 660.39, diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineAtlasAsset.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineAtlasAsset.cs index 9d7cecf26..9f4c03e58 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineAtlasAsset.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Asset Types/SpineAtlasAsset.cs @@ -71,8 +71,9 @@ namespace Spine.Unity { string[] atlasLines = atlasString.Split('\n'); var pages = new List(); for (int i = 0; i < atlasLines.Length - 1; i++) { - if (atlasLines[i].Trim().Length == 0) - pages.Add(atlasLines[i + 1].Trim().Replace(".png", "")); + string line = atlasLines[i].Trim(); + if (line.EndsWith(".png")) + pages.Add(line.Replace(".png", "")); } // Populate Materials[] by matching texture names with page names.