我遇到了同樣的問題。我不知道一個好的解決方案,但我剛剛通過使用文本編輯器打開.json文件來手動添加gid。尋找一些說
"name":(Your object layer name),
"objects":[
{
first object properties...
},
{
second object properties...
}
現在,爲每個對象,你想分配一個gid,將此文本添加到它的屬性的頂部。
"gid":(Desired gid),
將逗號放在最後非常重要。 這裏是一個示例:
"name":"mainObjects",
"objects":[
{
"gid":34,
"height":32,
"id":6,
"name":"",
"properties":
{
},
"rotation":0,
"type":"fire",
"visible":true,
"width":32,
"x":352,
"y":1248
},
{
"gid":34,
"height":32,
"id":7,
"name":"",
"properties":
{
},
"rotation":0,
"type":"fire",
"visible":true,
"width":32,
"x":384,
"y":1248
}],
注意如何爲每個對象我增加了「GID」特性,並賦予它的34值,這個值可以是你想要什麼,雖然。
現在,這將是惱人的,因爲每次你導出平鋪地圖,它會刪除gid。就像我說的那樣,這不是一個很好的解決方案,但它會起作用,直到有人能夠以更好的方式迴應。
奇怪。我想知道原始的GID資產從哪裏來?平鋪的老編輯回來的一天?謝謝! –