mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
39b08f5044
20
spine-unity/Assets/Spine Examples/package.json
Normal file
20
spine-unity/Assets/Spine Examples/package.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "com.esotericsoftware.spine.spine-unity-examples",
|
||||||
|
"displayName": "spine-unity Runtime Examples",
|
||||||
|
"description": "This plugin provides example scenes and scripts for the spine-unity runtime.",
|
||||||
|
"version": "3.8.0",
|
||||||
|
"unity": "2018.3",
|
||||||
|
"author": {
|
||||||
|
"name": "Esoteric Software",
|
||||||
|
"email": "contact@esotericsoftware.com",
|
||||||
|
"url": "http://esotericsoftware.com/"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"com.esotericsoftware.spine.spine-unity": "3.8.0"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"spine",
|
||||||
|
"spine-unity",
|
||||||
|
"core"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
spine-unity/Assets/Spine Examples/package.json.meta
Normal file
7
spine-unity/Assets/Spine Examples/package.json.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3344f01d63135c94e81d853f56d6c4e5
|
||||||
|
PackageManifestImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "spine-unity-examples",
|
||||||
|
"references": [ "spine-unity" ]
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8f5163e4753269348a069fd2fedcba29
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -30,7 +30,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
#if UNITY_EDITOR
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Spine.Unity {
|
namespace Spine.Unity {
|
||||||
|
|
||||||
@ -41,6 +44,7 @@ namespace Spine.Unity {
|
|||||||
static readonly int[][] compatibleJsonVersions = { new[] { 3, 9, 0 }, new[] { 3, 8, 0 } };
|
static readonly int[][] compatibleJsonVersions = { new[] { 3, 9, 0 }, new[] { 3, 8, 0 } };
|
||||||
|
|
||||||
static bool wasVersionDialogShown = false;
|
static bool wasVersionDialogShown = false;
|
||||||
|
static readonly Regex jsonVersionRegex = new Regex(@"""spine""\s*:\s*""([^""]+)""", RegexOptions.CultureInvariant);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public enum SourceType {
|
public enum SourceType {
|
||||||
@ -92,23 +96,29 @@ namespace Spine.Unity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
object obj = Json.Deserialize(new StringReader(asset.text));
|
Match match = jsonVersionRegex.Match(asset.text);
|
||||||
if (obj == null) {
|
if (match != null) {
|
||||||
Debug.LogErrorFormat("'{0}' is not valid JSON.", asset.name);
|
fileVersion.rawVersion = match.Groups[1].Value;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
object obj = Json.Deserialize(new StringReader(asset.text));
|
||||||
|
if (obj == null) {
|
||||||
|
Debug.LogErrorFormat("'{0}' is not valid JSON.", asset.name);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var root = obj as Dictionary<string, object>;
|
var root = obj as Dictionary<string, object>;
|
||||||
if (root == null) {
|
if (root == null) {
|
||||||
Debug.LogErrorFormat("'{0}' is not compatible JSON. Parser returned an incorrect type while parsing version info.", asset.name);
|
Debug.LogErrorFormat("'{0}' is not compatible JSON. Parser returned an incorrect type while parsing version info.", asset.name);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.ContainsKey("skeleton")) {
|
if (root.ContainsKey("skeleton")) {
|
||||||
var skeletonInfo = (Dictionary<string, object>)root["skeleton"];
|
var skeletonInfo = (Dictionary<string, object>)root["skeleton"];
|
||||||
object jv;
|
object jv;
|
||||||
skeletonInfo.TryGetValue("spine", out jv);
|
skeletonInfo.TryGetValue("spine", out jv);
|
||||||
fileVersion.rawVersion = jv as string;
|
fileVersion.rawVersion = jv as string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
spine-unity/Assets/Spine/package.json
Normal file
19
spine-unity/Assets/Spine/package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
|
"displayName": "spine-unity Runtime",
|
||||||
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
|
"version": "3.8.0",
|
||||||
|
"unity": "2018.3",
|
||||||
|
"author": {
|
||||||
|
"name": "Esoteric Software",
|
||||||
|
"email": "contact@esotericsoftware.com",
|
||||||
|
"url": "http://esotericsoftware.com/"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"spine",
|
||||||
|
"spine-unity",
|
||||||
|
"core"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
spine-unity/Assets/Spine/package.json.meta
Normal file
7
spine-unity/Assets/Spine/package.json.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 09478c42aa0375347898d942d287a819
|
||||||
|
PackageManifestImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
x
Reference in New Issue
Block a user