mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed atlas asset problems after re-export with latest 4.0 Spine Editor beta version.
This commit is contained in:
parent
dc6a0233f3
commit
b5a7601a41
@ -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-ess.json "$UNITY_TARGET_DIR/dragon.json"
|
||||||
cp -f ../dragon/export/dragon-pma.atlas "$UNITY_TARGET_DIR/dragon.atlas.txt"
|
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-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-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"
|
UNITY_TARGET_DIR="$ROOT/spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins"
|
||||||
cp -f ../goblins/export/goblins-pro.json "$UNITY_TARGET_DIR/goblins.json"
|
cp -f ../goblins/export/goblins-pro.json "$UNITY_TARGET_DIR/goblins.json"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
dragon-pma.png
|
dragon.png
|
||||||
size: 1024, 1024
|
size: 1024, 1024
|
||||||
filter: Linear, Linear
|
filter: Linear, Linear
|
||||||
pma: true
|
pma: true
|
||||||
@ -87,7 +87,7 @@ tail06
|
|||||||
thiagobrayner
|
thiagobrayner
|
||||||
bounds: 54, 912, 350, 31
|
bounds: 54, 912, 350, 31
|
||||||
|
|
||||||
dragon-pma2.png
|
dragon2.png
|
||||||
size: 1024, 512
|
size: 1024, 512
|
||||||
filter: Linear, Linear
|
filter: Linear, Linear
|
||||||
pma: true
|
pma: true
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"skeleton": {
|
"skeleton": {
|
||||||
"hash": "UIFpNNbbcQI",
|
"hash": "UIFpNNbbcQI",
|
||||||
"spine": "4.0.58-beta",
|
"spine": "4.0.59-beta",
|
||||||
"x": -366.31,
|
"x": -366.31,
|
||||||
"y": -286.62,
|
"y": -286.62,
|
||||||
"width": 660.39,
|
"width": 660.39,
|
||||||
|
|||||||
@ -71,8 +71,9 @@ namespace Spine.Unity {
|
|||||||
string[] atlasLines = atlasString.Split('\n');
|
string[] atlasLines = atlasString.Split('\n');
|
||||||
var pages = new List<string>();
|
var pages = new List<string>();
|
||||||
for (int i = 0; i < atlasLines.Length - 1; i++) {
|
for (int i = 0; i < atlasLines.Length - 1; i++) {
|
||||||
if (atlasLines[i].Trim().Length == 0)
|
string line = atlasLines[i].Trim();
|
||||||
pages.Add(atlasLines[i + 1].Trim().Replace(".png", ""));
|
if (line.EndsWith(".png"))
|
||||||
|
pages.Add(line.Replace(".png", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate Materials[] by matching texture names with page names.
|
// Populate Materials[] by matching texture names with page names.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user