- Düzenlendi
我的Spine导出json文件有问题
Spine导出json文件 我没有设定皮肤
"name": "default",前面会加了一个“name” 我看别人的导出文件都没有“name”
以至于程序那边导入带“name”的json文件会有报错
这是为什么
之后我试了别人做的spine文件 导出还是有“name” 别人导出就没有
帮忙解答 谢谢
下面是源码 第二行的“name”导出一直在
"skins": [{
"name": "default",
"attachments": {
"armAD": {
"armAD": {
"type": "mesh",
"uvs": [0.89202, 0.15353, 0.94549, 0.41304, 0.9247, 0.65151, 0.79993, 0.90401, 0.60387, 1, 0.25037, 0.9475, 0.31276, 0.65291, 0, 0.40041, 0.06323, 0.1928, 0.27414, 0.07778, 0.60684, 0, 0.42267, 0.84089, 0.64843, 0.82966, 0.70487, 0.62486, 0.67517, 0.2391, 0.49396, 0.62486, 0.40187, 0.43969],
"triangles": [14, 10, 0, 14, 0, 1, 14, 16, 9, 14, 9, 10, 8, 9, 16, 7, 8, 16, 13, 14, 1, 16, 14, 13, 15, 16, 13, 2, 13, 1, 6, 7, 16, 6, 16, 15, 12, 15, 13, 11, 6, 15, 11, 15, 12, 3, 13, 2, 12, 13, 3, 5, 6, 11, 4, 11, 12, 4, 12, 3, 5, 11, 4],
"vertices": [-2.78, 11.54, 15.95, 12.91, 33.09, 11.79, 51.17, 7.12, 57.92, 0.29, 53.85, -11.64, 32.7, -9.01, 14.27, -19.21, -0.62, -16.7, -8.73, -9.33, -14.06, 2.11, 46.32, -5.6, 45.69, 2.1, 31, 4.37, 3.21, 4.02, 30.82, -2.8, 17.42, -5.61],
"hull": 11,
"edges": [0, 20, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20],
"width": 31,
"height": 65
求助啊
我们团队今天也遇到这个问题,于是使用旧版本Spine输出同一动画进行对比,发现应该是Spine新旧版本输出的json格式有差异
旧版本json文件skins部分格式:
"skins": {
"default": {
"01": {
"images/Emoji_kb_01_0001": { "width": 90, "height": 70 },
……
新版本json文件skins部分格式:
"skins":[
{"name":"default","attachments":{
"01":{
"images/Emoji_kb_01_0001":{"width":90,"height":70},
……
感觉官方应该提供一个输出旧版本json的功能
在该功能上线前只能暂时用旧版本Spine
coldbreath yazdı
我将了版本 用3.7.94 3.8确实有这个问题 而且程序那边的库做升级很麻烦 只能降到3.7.94来做
用于创建动画和导出的Spine编辑器的版本与Spine运行时的版本必须始终匹配。 即 如果您在Spine Editor 3.8.x中创建和导出动画,则必须使用Spine Runtimes 3.8版。
通常不可能或不建议混合使用Spine Editor版本和Spine Runtimes版本。
尽管可以通过某些工作实现(例如解决模块/命名空间问题),但也不建议在单个应用程序中混合使用两个Spine Runtimes版本。
我们建议您始终确保将Spine Editor项目更新到最新的Spine Editor版本,并相应地更新Spine Runtimes版本。 较新的Spine Editor版本始终可以打开使用较旧的Spine Editor版本创建的Spine项目。 请注意,将Spine项目保存在较新的Spine Editor版本中后,将其降级到较旧的版本很复杂!
The version of the Spine Editor you are using to create the animations and exports, and the version of the Spine Runtimes must always match. I.e. if you create and export animations in Spine Editor 3.8.x you must use the Spine Runtimes version 3.8.
Mixing of Spine Editor versions and Spine Runtimes versions is generally not possible or advised.
Mixing two Spine Runtimes versions in a single application is also not advised, though possible with some work (e.g. resolve module/namespace issues).
We suggest you always make sure your Spine Editor projects are updated to the latest Spine Editor version, and also update the Spine Runtimes version accordingly. Newer Spine Editor versions can always open Spine projects created with an older Spine Editor version. Note that once you save a Spine project in a newer Spine Editor version, it is complicated to downgrade it to an older version!
如果您需要将.spine项目文件(而不是导出的文件)从3.8回滚到3.7,请参阅Nate的发布:
3.7.94版本导出json文件可以降级到3.6.53的方法?
If you need to rollback the .spine
project file (not the exported files) from 3.8 to 3.7, please see this posting by Nate:
3.7.94版本导出json文件可以降级到3.6.53的方法?