{"id":286357,"date":"2017-05-15T15:45:03","date_gmt":"2017-05-15T11:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286357"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2017-05-15T11:45:03","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286357","title":{"rendered":"Tiled2Unity: \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0438\u0437 Tiled Map Editor \u0432 Unity"},"content":{"rendered":"<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e 2D \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0433\u0440. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 Unity, \u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442 \u2014 Tiled Map Editor. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u0440\u0435\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Tiled2Unity, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0437 TME \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0435\u0444\u0430\u0431\u044b \u0432 Unity.<\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440\u0430 \u201cX-Drums\u201d. <\/p>\n<p>  \u0414\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<ol>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 Tiled2Unity<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u0432 Tiled Map Editor<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Tiled2Unity<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 Tiled Map Editor<\/li>\n<\/ol>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0435\u0432 (\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432)<\/li>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Unity \u0438 \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 Tiled Map Editor. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Unity \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c <a href=\"http:\/\/www.seanba.com\/tiled2unity\">Tiled2Unity.unitypackage<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/4d2\/5d5\/de4\/4d25d5de4e79423fa040d6604feeb0d3.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 Tiled Map Editor \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/1de\/68f\/5ff\/1de68f5ff71046b78152bed5f43f9a02.png\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0443\u0442\u044c \u0434\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Tiled2Unity.exe. \u0412\u043c\u0435\u0441\u0442\u043e %mapfile Tiled \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043a\u0430\u0440\u0442\u044b. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2014 \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 Tiled2Unity, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/577\/e94\/592\/577e9459265949f0ba91e0dfbea556b7.png\"\/><\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/c48\/834\/304\/c48834304f364b90a9bf9fb78eef9fe6.png\"\/><\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0435\u0444\u0430\u0431 \u043a\u0430\u0440\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 Tiled2Unity. \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u0435\u0444\u0430\u0431 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 \u0432 Unity. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439 \u0432 TME \u0438 \u0435\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435, \u043f\u0440\u0435\u0444\u0430\u0431 \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 TME.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/3e7\/8bd\/20f\/3e78bd20febb48b5926b605dae9f475e.png\"\/><\/p>\n<p>  \u0422\u0430\u043a \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u043a\u0430\u0440\u0442\u044b \u0438\u0437 Tiled \u0432 Unity \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0438\u0433\u0440\u043e\u0432\u0443\u044e \u0441\u0440\u0435\u0434\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u0435.<\/p>\n<h4>2. \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439<br \/>  <\/h4>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0433\u0435\u0440\u043e\u044f. \u042d\u0442\u043e \u043f\u043e\u043b, \u0441\u0442\u0435\u043d\u044b, \u0441\u043e\u0444\u0438\u0442\u044b \u043d\u0430 \u043f\u043e\u0442\u043e\u043b\u043a\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0430\u0440\u0430\u0431\u0430\u043d\u044b, \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u0439. <\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u0432 Tiled: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/39c\/ff3\/e3c\/39cff3e3c5f64dd390648f5c0846ec09.png\"\/><\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0442\u0430\u0439\u043b, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0447\u0430\u0441\u0442\u044c \u0431\u0430\u0440\u0430\u0431\u0430\u043d\u0430, \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u044b: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/fc8\/41b\/f3a\/fc841bf3a6c24abb8cf1873200eb5770.png\"\/><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0442\u0430\u0439\u043b\u044b (\u043f\u043e\u043b, \u0441\u0442\u0435\u043d\u044b \u0438 \u0442.\u0434.). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 Tiled2Unity \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043a\u043e\u043b\u043b\u0430\u0439\u0434\u0435\u0440\u044b PolygonCollider2D, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u0440\u043e\u044f \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f\u043c\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/1ef\/b23\/3a3\/1efb233a3ffb4f19b726cf3848580174.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/476\/724\/ff5\/476724ff543e47e9a03ea547e9b2e9fa.gif\"\/><\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0433\u0440\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u0439, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u0440\u0435\u043b\u043e\u043a, \u0444\u0430\u043d\u0430\u0442\u043e\u043a, \u043d\u043e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 Tiled \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 Unity.<\/p>\n<h4>3. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Tiled2Unity<\/h4>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Tiled \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0445 \u0432 Unity, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Tiled2Unity \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u0437\u0430 \u043d\u0430\u0441. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:  <\/p>\n<table>\n<tr>\n<td>unity:layer<br \/>  unity:sortingLayerName <br \/>  unity:tag <br \/>  unity:sortingOrder<br \/>  unity:isTrigger <br \/>  unity:ignore <\/td>\n<td>The (physics) layer name in Unity <br \/>  The Name of the Sorting Layer in Unity<br \/>  The Name of the Tag in Unity<br \/>  The `sorting in layer` value in Unity<br \/>  Whether collider is a trigger or not<br \/>  Ignore layer (or parts of it) during import(value = [false|true|collision|visual])  <\/td>\n<\/tr>\n<\/table>\n<p>  \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0431\u0430\u0440\u0430\u0431\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u043b\u043e\u0447\u0435\u043a, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u0439: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/300\/4fa\/2a7\/3004fa2a784e4a6eabff44aba79ad716.png\"\/><\/p>\n<p>  \u041f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 \u0432 Unity \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/436\/59a\/a30\/43659aa301fc405c9725179fc2a18861.png\"\/><\/p>\n<p>  \u0421\u043b\u043e\u044e \u0437\u0430\u0434\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 OneWayPlatform, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043d\u0438\u0446\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u043d\u0438\u0437\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/fcb\/bcd\/4a1\/fcbbcd4a18f5446a918a1295aeb58064.gif\"\/><\/p>\n<h4>4. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 Tiled<\/h4>\n<p>  \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 \u201c\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438\u201d, \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 Unity. \u0417\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 Tiled \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0434\u043b\u044f \u0441\u043b\u043e\u0435\u0432 (\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432), \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <b>4.1. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0435\u0432 (\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432)<\/b><\/p>\n<p>  \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u044f. \u042d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0412 \u043d\u0430\u0448\u0435\u0439 \u0438\u0433\u0440\u0435 \u0442\u0430\u043a\u0438\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u0440\u0435\u043b\u043a\u0438 \u0438 \u043d\u043e\u0442\u044b. \u0418\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u0433\u0435\u0440\u043e\u0435\u043c \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. <\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043b\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Tiled \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u043c \u043d\u0430\u0448\u0438 \u0442\u0430\u0440\u0435\u043b\u043a\u0438. \u0417\u0430\u0442\u0435\u043c, \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 AddObject \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0441\u043b\u043e\u044f. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/31b\/287\/75b\/31b28775b62547c392bb97db43d88d3f.png\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0435 \u0441\u0432\u043e\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0440\u0435\u043b\u043a\u0438 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/8a3\/283\/e1c\/8a3283e1c78e4301bdd18b8e83b93ea1.png\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Unity, \u0433\u0434\u0435 \u0434\u043b\u044f \u0442\u0430\u0440\u0435\u043b\u043e\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0435\u0444\u0430\u0431 \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043b\u0438 \u043a \u043d\u0435\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u044b\u0436\u043a\u0435 \u0433\u0435\u0440\u043e\u044f \u2014 \u043e\u043d\u0438 \u043f\u0430\u0434\u0430\u044e\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u0442\u0430\u0440\u0435\u043b\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u0437 Tiled \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0435\u0444\u0430\u0431\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 CustomTiledImporterForHiHats \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Tiled2Unity.ICustomTiledImporter \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c [Tiled2Unity.CustomTiledImporter]. <\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 Tiled2Unity \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0438\u0437 Tiled \u0441\u043b\u043e\u044f \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0410 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u0442\u0435 \u0441\u043b\u043e\u0438 \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0440\u0435\u0434\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 AddObject \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u201cHi-hat\u201d.<\/p>\n<pre><code>using System.Collections.Generic; using UnityEditor; using UnityEngine;  [Tiled2Unity.CustomTiledImporter] class CustomTiledImporterForHiHats : Tiled2Unity.ICustomTiledImporter {     public void HandleCustomProperties(GameObject gameObject, IDictionary&lt;string, string&gt; props)     {         if (!props.ContainsKey(&quot;AddObject&quot;))             return;          if (props[&quot;AddObject&quot;] == &quot;Hi-hat&quot;)         {             \/\/\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0440\u0435\u0444\u0430\u0431 \u0442\u0430\u0440\u0435\u043b\u043e\u043a             string prefabPath = &quot;Assets\/8 - Prefabs\/Hi-hat.prefab&quot;;             Object obj = AssetDatabase.LoadAssetAtPath(prefabPath, typeof(GameObject));             if (obj == null)                 return;              \/\/\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0438\u0437 Tiled,              \/\/\u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0435\u0444\u0430\u0431\u0430             \/\/\u0421\u0430\u043c\u0438 \u0442\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0441\u043e \u0441\u0446\u0435\u043d\u044b             List&lt;GameObject&gt; childrenToDestroy = new List&lt;GameObject&gt;();             \/\/\u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u043b\u043e\u044f             foreach (Transform child in gameObject.transform)             {                 if (child.name == &quot;TileObject&quot;)                 {                     \/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f                     childrenToDestroy.Add(child.gameObject);                       \/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0435\u0444\u0430\u0431\u0430, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435                     GameObject objInstance = (GameObject)GameObject.Instantiate(obj);                     objInstance.name = obj.name;                     objInstance.transform.parent = gameObject.transform;                     objInstance.transform.position = child.transform.position;                 }             }             \/\/\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u0430\u0439\u043b\u044b \u0441\u043e \u0441\u0446\u0435\u043d\u044b             childrenToDestroy.ForEach(child =&gt; GameObject.DestroyImmediate(child));            }     }      public void CustomizePrefab(GameObject prefab)     {     } }  <\/code><\/pre>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0433\u043e\u0442\u043e\u0432, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0440\u0435\u043b\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/dcf\/93d\/d01\/dcf93dd01748438e92a1a7ecac8c7893.png\"\/><\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u043d\u0438\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/afa\/fef\/182\/afafef1822154f9bb7a4e00cdab830cb.gif\"\/><\/p>\n<p>  \u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043d\u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0442\u0430\u0440\u0435\u043b\u043e\u043a. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u043d\u043e\u0442 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0446\u0432\u0435\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u043e\u0442 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u0435\u0444\u0430\u0431 \u0432 Unity \u0438 \u0441\u043b\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Tiled, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u043c\u0443 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 AddObject \u0442\u0438\u043f \u043d\u043e\u0442\u044b. \u0421\u043a\u0440\u0438\u043f\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043f\u0440\u0435\u0444\u0430\u0431\u043e\u0432, \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0442\u0430\u0440\u0435\u043b\u043e\u043a.<\/p>\n<p>  <b>4.2. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/b><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u043d\u044b \u043d\u0435 \u0441\u043b\u043e\u044e, \u0430 \u0441\u0430\u043c\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443. \u041a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u043c\u044b \u043e\u0442\u043d\u0435\u0441\u0435\u043c \u043d\u0430\u0448\u0438\u0445 \u0444\u0430\u043d\u0430\u0442\u043e\u043a, \u043a\u0443\u043f\u0438\u0434\u043e\u043d\u043e\u0432, \u0434\u0432\u0438\u0436\u0443\u0449\u0438\u0435\u0441\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438 \u0442.\u0434. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0441\u0442\u044c, \u043e\u043d\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u0440. <\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0444\u0430\u043d\u0430\u0442\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0446\u0432\u0435\u0442\u0443, \u043e\u043d\u0438 \u0434\u0432\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043d\u0430 \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0440\u0433\u043d\u0443\u0442\u044c, \u0430 \u043f\u0440\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0441 \u0433\u0435\u0440\u043e\u0435\u043c \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0432\u044b\u0434\u0430\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u044d\u043c\u043e\u0446\u0438\u0439. \u0417\u0430\u0434\u0430\u0435\u043c \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 Tiled \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u201c\u0421\u0432\u043e\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b\u201d \u0434\u043b\u044f \u0441\u043b\u043e\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/44f\/91e\/c69\/44f91ec69a2b4f52a4ebaedbab5934fc.png\"\/><\/p>\n<p>  \u0412 Unity \u0434\u043b\u044f \u0444\u0430\u043d\u0430\u0442\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u0440\u0435\u0444\u0430\u0431\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 GirlController, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u043d\u0430 \u0433\u0435\u0440\u043e\u044f. \u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0438\u043c\u043f\u043e\u0440\u0442\u0443 \u0442\u0430\u0440\u0435\u043b\u043e\u043a, \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043f\u0440\u0435\u0444\u0430\u0431\u0430 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 GirlController \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u044b \u0432 Tiled \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0430\u043d\u0430\u0442\u043a\u0438.<\/p>\n<pre><code>using System.Collections.Generic; using UnityEditor; using UnityEngine;  [Tiled2Unity.CustomTiledImporter] class CustomTiledImporterForGirls : Tiled2Unity.ICustomTiledImporter {     public void HandleCustomProperties(GameObject gameObject, IDictionary&lt;string, string&gt; props)     {         if (!props.ContainsKey(&quot;GirlColor&quot;))             return;          \/\/\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0430\u0431 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 Tiled \u0446\u0432\u0435\u0442\u0430         string prefabPath = &quot;Assets\/8 - Prefabs\/Girls\/Girl_&quot; + props[&quot;GirlColor&quot;] + &quot;.prefab&quot;;         Object obj = AssetDatabase.LoadAssetAtPath(prefabPath, typeof(GameObject));          \/\/\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0435\u0444\u0430\u0431\u0430, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435         GameObject objInstance = (GameObject)Object.Instantiate(obj);         objInstance.name = obj.name;         objInstance.transform.parent = gameObject.transform.parent;         objInstance.transform.position = gameObject.transform.position;         objInstance.transform.localScale = gameObject.transform.localScale;         objInstance.transform.eulerAngles = gameObject.transform.eulerAngles;          \/\/\u041e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0430\u043d\u0430\u0442\u043a\u0438         \/\/\u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 Tiled \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430         var girlController = objInstance.GetComponent&lt;GirlController&gt;();         if (props.ContainsKey(&quot;OffsetRight&quot;))             float.TryParse(props[&quot;OffsetRight&quot;], out girlController.OffsetMax);         if (props.ContainsKey(&quot;OffsetLeft&quot;))             float.TryParse(props[&quot;OffsetLeft&quot;], out girlController.OffsetMin);         if (props.ContainsKey(&quot;Velocity&quot;))             float.TryParse(props[&quot;Velocity&quot;], out girlController.Velocity);         if (props.ContainsKey(&quot;Stop&quot;))             float.TryParse(props[&quot;Stop&quot;], out girlController.StopCount);         if (props.ContainsKey(&quot;Fatal&quot;))             bool.TryParse(props[&quot;Fatal&quot;], out girlController.Fatal);         if (props.ContainsKey(&quot;HeartType&quot;))         {             string heartPrefabPath = &quot;Assets\/8 - Prefabs\/Girls\/&quot; + props[&quot;HeartType&quot;] + &quot;.prefab&quot;;             Object heartObj = AssetDatabase.LoadAssetAtPath(heartPrefabPath, typeof(GameObject));             girlController.heartPrefab = heartObj;         }          \/\/\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u0430\u0439\u043b \u0441\u043e \u0441\u0446\u0435\u043d\u044b         Object.DestroyImmediate(gameObject);     }      public void CustomizePrefab(GameObject prefab)     {     } } <\/code><\/pre>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 Unity \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 Tiled, \u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 GirlController:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/daa\/e35\/b0c\/daae35b0c0f6489ba17eb6e2afde0d9b.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/676\/8fd\/c7e\/6768fdc7e45142eab623f106a6614626.gif\"\/><\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u0440\u0443\u043f\u043f, \u0438 \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435 \u0432 Unity \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0444\u0430\u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0438\u0433\u0440\u044b. <\/p>\n<p>  <i>\u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440\u0430. \u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 Tiled Map Editor \u0438 Unity, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u0435, \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443 \u0443\u0440\u043e\u0432\u043d\u044f \u0432 TME \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0432 Unity, \u043d\u0435 \u043c\u0435\u0448\u0430\u044f \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043d\u0430\u0448\u0435\u043c\u0443, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 Tiled2Unity \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u0438, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e, \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u0445.<br \/>  <\/i><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328700\/\"> https:\/\/habrahabr.ru\/post\/328700\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e 2D \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0433\u0440. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 Unity, \u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442 \u2014 Tiled Map Editor. \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u0440\u0435\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Tiled2Unity, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0437 TME \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0435\u0444\u0430\u0431\u044b \u0432 Unity.<\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u0440\u0430 \u201cX-Drums\u201d. <\/p>\n<p>  \u0414\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<ol>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 Tiled2Unity<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0439 \u0432 Tiled Map Editor<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Tiled2Unity<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 Tiled Map Editor<\/li>\n<\/ol>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0435\u0432 (\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432)<\/li>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Unity \u0438 \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432 Tiled Map Editor. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Unity \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c <a href=\"http:\/\/www.seanba.com\/tiled2unity\">Tiled2Unity.unitypackage<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/4d2\/5d5\/de4\/4d25d5de4e79423fa040d6604feeb0d3.png\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-286357","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286357"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286357\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}