{"id":393293,"date":"2024-06-29T10:55:31","date_gmt":"2024-06-29T10:55:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=393293"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=393293","title":{"rendered":"<span>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Unity \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f iOS \u0438 Android<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u0415\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439 \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 Unity \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0411\u0430\u043d\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440, \u0432 Unity \u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0430\u043b\u0435\u0440\u0435\u0439 \u0438 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e Unity \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u043d\u043e 60-70% \u0432\u0441\u0435\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438\u0433\u0440, \u043a\u0430\u043a \u0431\u044b \u0433\u043e\u0432\u043e\u0440\u044f\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/30\/32\/ff\/3032ffvfanu_beevddaermppcmm.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/30\/32\/ff\/3032ffvfanu_beevddaermppcmm.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0441\u0430\u043c\u043e\u0439 Unity, \u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u043e\u0434\u0432\u0438\u0436\u0435\u043a \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0443 \u043d\u0438\u0445 \u043d\u0435\u0442. \u041e\u043d\u0438 \u0437\u0430\u043d\u044f\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438\u2026 \u0412 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u0443\u0446\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u0434\u0430 \u0438 \u0432\u0441\u0451 \u0432\u0440\u043e\u0434\u0435. \u042d\u0442\u043e \u0435\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u043c\u043e\u0431\u0430\u0439\u043b. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043e\u043d\u0438 \u0437\u0430\u0440\u0435\u043b\u0438\u0437\u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f <a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.localization@1.0\/manual\/index.html\" rel=\"nofollow noopener noreferrer\">\u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a> (\u0443\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e!). \u0412\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u043b\u0438\u0431\u043e \u043d\u0430 Github \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u044e\u0442 \u0432 Asset Store. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0432 \u0441\u0442\u043e\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438 \u043a\u0443\u043f\u0438\u0442\u044c (\u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c) \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u041d\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0430-\u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u044f\u043d\u0443\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0430\u043a\u0435\u0442. \u0410 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: <\/p>\n<ul>\n<li>\u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f<\/li>\n<li>\u0438\u043d-\u0430\u043f\u043f \u043e\u0446\u0435\u043d\u043a\u0438 \u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438<\/li>\n<li>\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f<\/li>\n<li>\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/li>\n<li>\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c<\/li>\n<li>\u043a\u0430\u0440\u0442\u044b<\/li>\n<\/ul>\n<p>  \u0418 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0443 Android \u0438 iOS \u0438 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 \u0438\u0433\u0440\u0430\u0445. \u0422\u043e\u043b\u044c\u043a\u043e \u0432 Unity \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0442. \u041d\u043e \u0431\u043b\u0430\u0433\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b.<\/p>\n<p>  \u0417\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f iOS \u0438 Android (iCloud, Google Sign-in, Sign-in with Apple, Firebase Push Service, In-app purchases, Browser, Sharing, Mail, Images, Review, NativeInput, &#8230;), \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0434\u0430\u0432\u043d\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0435 \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0442\u043b\u0430\u0436\u0435\u043d\u0430, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \ud83d\ude42 \u0414\u0430, \u043e\u043d\u0430 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0430, \u043d\u043e \u0437\u0430\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  \u0412 \u0431\u043b\u043e\u0433\u0435 \u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043f\u0438\u0448\u0443 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u043f\u043e\u0441\u0442\u044b \u043f\u0440\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u044b:<\/p>\n<p>  <a href=\"https:\/\/mopsicus.ru\/all\/unity-ios-plugin\/\" rel=\"nofollow noopener noreferrer\">Unity iOS plugin<\/a><br \/>  <a href=\"https:\/\/mopsicus.ru\/all\/unity-android-plugin\/\" rel=\"nofollow noopener noreferrer\">Unity Android plugin<\/a><br \/>  <a href=\"https:\/\/mopsicus.ru\/all\/ios-android-unity-plugin-system\/\" rel=\"nofollow noopener noreferrer\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f iOS \u0438 Android<\/a><br \/>  <a href=\"https:\/\/mopsicus.ru\/all\/unity-share-plugin-ios-android\/\" rel=\"nofollow noopener noreferrer\">Unity share \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f iOS \u0438 Android<\/a><\/p>\n<p>  \u041e\u043d\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435: \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0435\u043c\u0430\/\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Unity \u0438 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2013 \u0430\u043f\u0434\u0435\u0439\u0442 \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430\u043a\u043e\u043f\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0434\u043b\u044f Unity: \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u043e \u0442\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c. \u0422. \u0435. \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u0435\u043d \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 (\u043f\u043e\u0447\u0442\u0438), \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u044f\u043d\u0443\u0442\u044c \u0441\u043a\u043e\u043f\u043e\u043c \u0432\u0441\u0451 \u0447\u0442\u043e \u0435\u0441\u0442\u044c, \u0440\u0430\u0434\u0438 \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u0441\u0442-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 :).<\/p>\n<h3>Unity \u0447\u0430\u0441\u0442\u044c (\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d)<\/h3>\n<p>  \u0423 Unity \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e <a href=\"https:\/\/docs.unity3d.com\/Manual\/Plugins.html\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/a>, \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u0438, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f. \u0410 \u0442\u0430\u043a \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (\u0438 \u043d\u0430 \u041c\u0435\u0434\u0438\u0443\u043c\u0435) \u0431\u044b\u043b\u0438 \u0443\u0436\u0435 \u0433\u043e\u0434\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c, \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0418 \u0442\u0430\u043a, \u0434\u0435\u043b\u0430\u0435\u043c <s>\u0435\u0449\u0451 \u043e\u0434\u043d\u0443<\/s> \u0441\u0432\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f: \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u041d\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442, \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Unity \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e. \u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0442\u0430\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441\u0432\u043e\u0439. \u041d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0442\u0443\u0434\u0430.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435\u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u043c\u044b\u043c, \u043c\u0430\u043b\u043e \u043b\u0438 \u043a\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0445 \u0438 \u043f\u0440\u0438 \u043a\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u041f\u043e\u043b\u0434\u0435\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u043e (\u043d\u0435\u0442). \u0415\u0449\u0451 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0418\u0445 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043a\u0430\u043a \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0432\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u0411\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0434 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c. <\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qw\/de\/zj\/qwdezjebo4sfec2ob3lr0wynppi.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/qw\/de\/zj\/qwdezjebo4sfec2ob3lr0wynppi.png\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using LeopotamGroup.Common; using NiceJson; #if UNITY_IOS using System.Runtime.InteropServices; #endif   \/\/\/ &lt;summary> \/\/\/ Mobile plugin interface \/\/\/ Each plugin must implement it \/\/\/ &lt;\/summary> public interface IPlugin {      \/\/\/ &lt;summary>     \/\/\/ Plaugin name     \/\/\/ &lt;\/summary>     string Name { get; }      \/\/\/ &lt;summary>     \/\/\/ Callback on get data     \/\/\/ &lt;\/summary>     void OnData(JsonObject data);      \/\/\/ &lt;summary>     \/\/\/ Callback on get error     \/\/\/ &lt;\/summary>     void OnError(JsonObject data); }  \/\/\/ &lt;summary> \/\/\/ Plugin service to manager all mobile plugins \/\/\/ &lt;\/summary> public class Plugins : MonoBehaviourService&lt;Plugins> {  #if UNITY_ANDROID     \/\/\/ &lt;summary>     \/\/\/ Mask for Java classes     \/\/\/ &lt;\/summary>     public const string ANDROID_CLASS_MASK = \"com.mopsicus.{0}.Plugin\"; #endif      \/\/\/ &lt;summary>     \/\/\/ Gameobject name on scene to receive data     \/\/\/ ACHTUNG! Do not change it     \/\/\/ &lt;\/summary>     const string _dataObject = \"Plugins\";      \/\/\/ &lt;summary>     \/\/\/ Dictionary of plugins     \/\/\/ &lt;\/summary>     private Dictionary&lt;string, IPlugin> _plugins = null;      \/\/\/ &lt;summary>     \/\/\/ Constructor     \/\/\/ &lt;\/summary>     protected override void OnCreateService() {         name = _dataObject;         DontDestroyOnLoad(gameObject);         InitPlugins();     }      \/\/\/ &lt;summary>     \/\/\/ Destructor     \/\/\/ &lt;\/summary>     protected override void OnDestroyService() {         _plugins = null;     }      \/\/\/ &lt;summary>     \/\/\/ Init all plugins in app     \/\/\/ &lt;\/summary>     void InitPlugins() {         gameObject.AddComponent&lt;Images>();         gameObject.AddComponent&lt;Mail>();         gameObject.AddComponent&lt;GoogleSignIn>();         IPlugin[] plugins = GetComponents&lt;IPlugin>();         _plugins = new Dictionary&lt;string, IPlugin>(plugins.Length);         foreach (IPlugin item in plugins) {             _plugins.Add(item.Name, item);         } #if DEBUG         Logger.Info(\"Plugins inited\"); #endif     }      \/\/\/ &lt;summary>     \/\/\/ Handler to process data to plugin     \/\/\/ ACHTUNG! Do not change it     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"data\">Data from plugin&lt;\/param>     void OnDataReceive(string data) { #if DEBUG         Logger.Info(\"Plugins receive data: \" + data); #endif         try {             JsonObject info = (JsonObject)JsonNode.ParseJsonString(data);             if (_plugins.ContainsKey(info[\"name\"])) {                 IPlugin plugin = _plugins[info[\"name\"]];                 if (info.ContainsKey(\"error\")) {                     plugin.OnError(info);                 } else {                     plugin.OnData(info);                 }             } else { #if DEBUG                 Logger.Error(string.Format(\"{0} plugin does not exists\", info[\"name\"])); #endif             }         } catch (Exception e) { #if DEBUG             Logger.Error(string.Format(\"Plugins receive error: {0}, stack: {1}\", e.Message, e.StackTrace)); #endif         }      }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 Unity \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0432\u043e\u0439 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0444\u043e\u0440\u043c\u0430\u0442\/\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>  \u041f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435, \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0435\u043c\u044b\u043c \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0437 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u0435 \u0441\u0443\u0442\u044c, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u0414\u0430, \u0432\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 IPlugin (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435).<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u0422\u0430\u043c \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f JSON \u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 JSON \u044f \u0434\u0430\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"https:\/\/github.com\/AngelQuirogaM\/NiceJson\" rel=\"nofollow noopener noreferrer\">NiceJson<\/a>, \u043c\u0435\u043d\u044f \u043e\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0445\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u0438 \u043a\u0443\u0447\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Unity. \u0422\u0430\u043a \u0447\u0442\u043e \u0442\u0443\u0442 \u0442\u043e\u0436\u0435, \u0441\u0432\u043e\u0431\u043e\u0434\u0430 \u0432\u044b\u0431\u043e\u0440\u0430.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.<\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0436\u0438\u0432\u0443\u0442 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <b>IPlugin<\/b>. \u041e\u043d \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0432\u044b\u0448\u0435. \u0412\u0441\u0451 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0438\u043c\u044f. \u042d\u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0430 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e. \u041d\u0438\u0436\u0435, \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u0435\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4o\/4i\/yt\/4o4iytatvsz74qejnbrl4bnpnus.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4o\/4i\/yt\/4o4iytatvsz74qejnbrl4bnpnus.png\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using LeopotamGroup.Common; using LeopotamGroup.Localization; using NiceJson; using UnityEngine; #if UNITY_IOS using System.Runtime.InteropServices; #endif  \/\/\/ &lt;summary> \/\/\/ Mail support \/\/\/ &lt;\/summary> public class Mail : MonoBehaviour, IPlugin {      \/\/\/ &lt;summary>     \/\/\/ Flag for error code for no mail account on device     \/\/\/ &lt;\/summary>     const string NO_ACCOUNT = \"NO_ACCOUNT\";      \/\/\/ &lt;summary>     \/\/\/ Flag for send error mail     \/\/\/ &lt;\/summary>     const string MAIL_ERROR = \"MAIL_ERROR\";      \/\/\/ &lt;summary>     \/\/\/ Current instance     \/\/\/ &lt;\/summary>     private static Mail _instance = null;      \/\/\/ &lt;summary>     \/\/\/ Cache data for hidden app state     \/\/\/ &lt;\/summary>     private JsonObject _data = null;      \/\/\/ &lt;summary>     \/\/\/ Cache error for hidden app state     \/\/\/ &lt;\/summary>     private JsonObject _error = null;  #if UNITY_IOS     \/\/\/ &lt;summary>     \/\/\/ Send mail     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"email\">Mail to send&lt;\/param>     \/\/\/ &lt;param name=\"subject\">Subject of mail&lt;\/param>     \/\/\/ &lt;param name=\"body\">Body of message&lt;\/param>     [DllImport(\"__Internal\")]     private static extern void mailSend(string email, string subject, string body); #endif      \/\/\/ &lt;summary>     \/\/\/ Constructor     \/\/\/ &lt;\/summary>     private void Awake() {         if ((object)_instance == null) {             _instance = GetComponent&lt;Mail>();         }     }      \/\/\/ &lt;summary>     \/\/\/ Plugin name     \/\/\/ &lt;\/summary>     public string Name {         get {             return GetType().Name.ToLower();         }     }      \/\/\/ &lt;summary>     \/\/\/ Callback on data     \/\/\/ &lt;\/summary>     public void OnData(JsonObject data) { #if DEBUG         Logger.Info(string.Format(\"{0} plugin OnData: {1}\", GetType().Name, data.ToJsonPrettyPrintString())); #endif         _data = data;         try {             _data = null;         } catch (Exception e) { #if DEBUG             Logger.Error(string.Format(\"{0} plugin OnData error: {1}\", GetType().Name, e.Message)); #endif         }     }      \/\/\/ &lt;summary>     \/\/\/ Callback on error     \/\/\/ &lt;\/summary>     public void OnError(JsonObject data) { #if DEBUG         Logger.Error(string.Format(\"{0} plugin OnError: {1}\", GetType().Name, data.ToJsonPrettyPrintString())); #endif         _error = (JsonObject)data[\"error\"];         try {             string code = _error[\"code\"];             switch (code) { #if UNITY_IOS                 case NO_ACCOUNT:                     Service&lt;Popup>.Get().Warning(Localizer.Get(BaseLocalizations.Plugins.NO_MAIL_ACCOUNT));                     break;                 case MAIL_ERROR:                     Service&lt;Popup>.Get().Error(Localizer.Get(BaseLocalizations.Plugins.MAIL_ERROR));                     break; #endif                 default:                     break;             }             _error = null;         } catch (Exception e) { #if DEBUG             Logger.Error(string.Format(\"{0} plugin OnError error: {1}\", GetType().Name, e.Message)); #endif         }     }      \/\/\/ &lt;summary>     \/\/\/ Send mail to     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"email\">Mail to send&lt;\/param>     \/\/\/ &lt;param name=\"subject\">Subject of mail&lt;\/param>     \/\/\/ &lt;param name=\"body\">Body of message&lt;\/param>     public static void Send(string email, string subject, string body) { #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"send\", email, subject, body);         } #elif UNITY_IOS         mailSend(email, subject, body); #endif     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d. \u0422\u0443\u0442 \u0432\u0440\u043e\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u044a\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e: \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 (\u043a\u0440\u043e\u043c\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a), \u0442\u043e \u043c\u0435\u0442\u043e\u0434 <b>OnData<\/b> \u043f\u0443\u0441\u0442\u043e\u0439.<\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0430\u043b\u0435\u0440\u0435\u0435\u0439 \u0438 \u043a\u0430\u043c\u0435\u0440\u043e\u0439. \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0438 \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430. \u041d\u0443 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435\u043c, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043e\u043b\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 Google Photo, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ju\/uv\/hu\/juuvhu4g9xic8yl20mcojijrply.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ju\/uv\/hu\/juuvhu4g9xic8yl20mcojijrply.png\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using LeopotamGroup.Common; using LeopotamGroup.Localization; using NiceJson; using UnityEngine; #if UNITY_IOS using System.Runtime.InteropServices; #endif  \/\/\/ &lt;summary> \/\/\/ Mobile native image plugin \/\/\/ &lt;\/summary> public class Images : MonoBehaviour, IPlugin {      \/\/\/ &lt;summary>     \/\/\/ State when user denied to show permission dialog     \/\/\/ &lt;\/summary>     const string NEVER_ASK_STATE = \"NEVER_ASK_STATE\";      \/\/\/ &lt;summary>     \/\/\/ Wait state to show loader while image downloading     \/\/\/ &lt;\/summary>     const string WAIT_STATE = \"WAIT_STATE\";      \/\/\/ &lt;summary>     \/\/\/ Cant save image to system gallery     \/\/\/ &lt;\/summary>     const string SAVE_ERROR = \"SAVE_ERROR\";      \/\/\/ &lt;summary>     \/\/\/ Save image to system gallery success     \/\/\/ &lt;\/summary>     const string SAVE_SUCCESS = \"SAVE_SUCCESS\";      \/\/\/ &lt;summary>     \/\/\/ Error occurs on capture photo or select in gallery     \/\/\/ &lt;\/summary>     const string IMAGE_ERROR = \"IMAGE_ERROR\";  #if UNITY_IOS     \/\/\/ &lt;summary>     \/\/\/ User denied access     \/\/\/ &lt;\/summary>     const string NO_PERMISSION = \"NO_PERMISSION\"; #endif      \/\/\/ &lt;summary>     \/\/\/ Current instance     \/\/\/ &lt;\/summary>     private static Images _instance = null;      \/\/\/ &lt;summary>     \/\/\/ Client service     \/\/\/ &lt;\/summary>     private Client _client = null;      \/\/\/ &lt;summary>     \/\/\/ Cache data for hidden app state     \/\/\/ &lt;\/summary>     private JsonObject _data = null;      \/\/\/ &lt;summary>     \/\/\/ Cache error for hidden app state     \/\/\/ &lt;\/summary>     private JsonObject _error = null;      \/\/\/ &lt;summary>     \/\/\/ Callback cache     \/\/\/ &lt;\/summary>     private Action&lt;string, int> _callback = null;      \/\/\/ &lt;summary>     \/\/\/ Callback cache for images saving     \/\/\/ &lt;\/summary>     private Action&lt;bool> _callbackSave = null;  #if UNITY_IOS     \/\/\/ &lt;summary>     \/\/\/ Request image from gallery     \/\/\/ &lt;\/summary>     [DllImport(\"__Internal\")]     private static extern void imagesPick();      \/\/\/ &lt;summary>     \/\/\/ Request image from camera     \/\/\/ &lt;\/summary>     [DllImport(\"__Internal\")]     private static extern void imagesCapture();      \/\/\/ &lt;summary>     \/\/\/ Open app settings     \/\/\/ &lt;\/summary>     [DllImport(\"__Internal\")]     private static extern void imagesSettings();      \/\/\/ &lt;summary>     \/\/\/ Save image to system gallery     \/\/\/ &lt;\/summary>     [DllImport(\"__Internal\")]     private static extern void imagesSave(string filePath); #endif      \/\/\/ &lt;summary>     \/\/\/ Constructor     \/\/\/ &lt;\/summary>     private void Awake() {         if ((object)_instance == null) {             _instance = GetComponent&lt;Images>();             _client = Service&lt;Client>.Get();         }     }      \/\/\/ &lt;summary>     \/\/\/ Plugin name     \/\/\/ &lt;\/summary>     public string Name {         get {             return GetType().Name.ToLower();         }     }      \/\/\/ &lt;summary>     \/\/\/ Callback on data     \/\/\/ &lt;\/summary>     public void OnData(JsonObject data) { #if DEBUG         Logger.Info(string.Format(\"{0} plugin OnData: {1}\", GetType().Name, data.ToJsonPrettyPrintString())); #endif         _data = data;         try {             string content = _data[\"data\"];             JsonObject response = (JsonObject)JsonNode.ParseJsonString(content);             string path = response[\"path\"];             int degree = response[\"degree\"];             switch (path) {                 case WAIT_STATE:                     Service&lt;Loader>.Get().Loading(Localizer.Get(BaseLocalizations.Common.WAIT));                     break;                 case SAVE_SUCCESS:                     _callbackSave(true);                     break;                 default:                     Service&lt;Loader>.Get().Hide();                     _callback(path, degree);                     break;             }             _data = null;         } catch (Exception e) { #if DEBUG             Logger.Error(string.Format(\"{0} plugin OnData error: {1}\", GetType().Name, e.Message)); #endif         }     }      \/\/\/ &lt;summary>     \/\/\/ Callback on error     \/\/\/ &lt;\/summary>     public void OnError(JsonObject data) { #if DEBUG         Logger.Error(string.Format(\"{0} plugin OnError: {1}\", GetType().Name, data.ToJsonPrettyPrintString())); #endif         _error = (JsonObject)data[\"error\"];         try {             string code = _error[\"code\"];             switch (code) { #if UNITY_ANDROID                 case NEVER_ASK_STATE:                     AskOpenSettings();                     break;                 case IMAGE_ERROR:                     Service&lt;Popup>.Get().Error(Localizer.Get(BaseLocalizations.Plugins.ERROR_IMAGE_LOAD));                     break; #elif UNITY_IOS                 case NO_PERMISSION:                     AskOpenSettings();                     break; #endif                 case SAVE_ERROR:                     _callbackSave(false);                     break;                 default:                     break;             }             _error = null;         } catch (Exception e) { #if DEBUG             Logger.Error(string.Format(\"{0} plugin OnError error: {1}\", GetType().Name, e.Message)); #endif         }     }      \/\/\/ &lt;summary>     \/\/\/ Open system settigns if user denied to show     \/\/\/ &lt;\/summary>     private void AskOpenSettings() {         Service&lt;Popup>.Get().Dialog(Localizer.Get(BaseLocalizations.Headers.PERMISSIONS), Localizer.Get(BaseLocalizations.Plugins.IMAGE_SETTINGS_MESSAGE), Localizer.Get(BaseLocalizations.Buttons.NO_YES), (button) => {             if (button > 0) { #if UNITY_EDITOR #elif UNITY_ANDROID                 using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {                     plugin.CallStatic(\"settings\");                 } #elif UNITY_IOS                 imagesSettings(); #endif             }         });     }      \/\/\/ &lt;summary>     \/\/\/ Save image to system gallery     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"filePath\">Path to image to save&lt;\/param>     public static void Save(string filePath, Action&lt;bool> callback) {         _instance._callbackSave = callback; #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"save\", filePath);         } #elif UNITY_IOS         imagesSave(filePath); #endif     }      \/\/\/ &lt;summary>     \/\/\/ Init app id for gallery     \/\/\/ &lt;\/summary>     public static void Init() { #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"init\", _instance._client.Config.GameName);         } #endif     }      \/\/\/ &lt;summary>     \/\/\/ Get image path from gallery     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"callback\">Path to image&lt;\/param>     public static void Pick(Action&lt;string, int> callback) {         _instance._callback = callback;  #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"pick\");         } #elif UNITY_IOS         imagesPick(); #endif     }      \/\/\/ &lt;summary>     \/\/\/ Get image path from camera     \/\/\/ &lt;\/summary>     \/\/\/ &lt;param name=\"callback\">Path to image&lt;\/param>     public static void Capture(Action&lt;string, int> callback) {         _instance._callback = callback; #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"capture\");         } #elif UNITY_IOS         imagesCapture(); #endif     }      \/\/\/ &lt;summary>     \/\/\/ Close service after use     \/\/\/ &lt;\/summary>     public static void Close() { #if UNITY_EDITOR #elif UNITY_ANDROID         using (AndroidJavaClass plugin = new AndroidJavaClass(string.Format(Plugins.ANDROID_CLASS_MASK, _instance.Name))) {             plugin.CallStatic(\"close\");         } #endif             }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0443\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 <b>Pick<\/b> \u0438 <b>Capture<\/b> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f Action \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0412 \u043d\u0451\u043c \u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u0443\u0433\u043e\u043b \u0435\u0451 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u0438\u0437 Exif \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u00ab\u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c\u00bb \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u043d\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0442\u0430\u043a \u0438 \u0432\u0441\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Unity: \u043f\u043e\u0432\u043e\u0440\u043e\u0442, \u043a\u0430\u0434\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0442.\u0434.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/f_\/tw\/gp\/f_twgpikbseywx_ynedg_2tjulu.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/f_\/tw\/gp\/f_twgpikbseywx_ynedg_2tjulu.png\"\/><\/p>\n<p>  \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0430\u0432 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u043c\u0435\u0440\u0435 \u0438 \u0433\u0430\u043b\u0435\u0440\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u0415\u0441\u043b\u0438 \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0430, \u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412\u0438\u0434\u0435\u043b \u043a\u0430\u043a \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0430\u0432 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0442.\u0435. \u0441\u0430\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u044f \u0442\u043e\u0436\u0435 \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u044e \u2013 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <b>Plugins\/iOS<\/b> \u0438\u043b\u0438 <b>Plugins\/Android<\/b>, \u0435\u0441\u043b\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0432 \u043b\u044e\u0431\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u0447\u0442\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <b>AndroidManifest.xml<\/b>, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443: <u>Assets\/Plugins\/Android<\/u>.<\/p>\n<h3>Android \u043f\u043b\u0430\u0433\u0438\u043d\u044b<\/h3>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043f\u043e\u0434 Android, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Android Studio, \u043f\u0438\u0448\u0443 \u043d\u0430 Java. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 Kotlin? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e. \u041d\u043e \u0432 \u043f\u043b\u0430\u043d\u0430\u0445, \u0432\u0441\u0451 \u0436\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043d\u0430 Kotlin \u0438 \u043d\u0430 Swift \u043f\u043e\u0434 iOS. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u044f \u043d\u0435 Android \u0438\u043b\u0438 iOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u0430 Java \u0438\u043b\u0438 Obj-C \ud83d\ude42<\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u2013 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 Android Library (AAR) \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/et\/yu\/-8\/etyu-8eef14q_pa3nrjlq9m3x-g.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/et\/yu\/-8\/etyu-8eef14q_pa3nrjlq9m3x-g.png\"\/><\/p>\n<p>  \u0412\u0445\u043e\u0434\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u2013 \u043a\u043b\u0430\u0441\u0441 <b>Plugin<\/b>. \u0412 \u043d\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043a \u043d\u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442 Unity. \u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 1-3 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b.<\/p>\n<ol>\n<li>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441<\/li>\n<li>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442<\/li>\n<li>\u0421\u0435\u0440\u0432\u0438\u0441<\/li>\n<\/ol>\n<p>  \u0412\u043e\u043e\u0431\u0449\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0432\u044b \u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 Unity.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432\u043e <a href=\"https:\/\/developer.android.com\/guide\/fragments\" rel=\"nofollow noopener noreferrer\">\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0445<\/a>. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c <b>onActivityResult<\/b>, \u0447\u0442\u043e \u0440\u0435\u0448\u0430\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0442\u0430\u0440\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438, \u043d\u0430 \u0441\u043c\u0435\u043d\u0443 \u043f\u0440\u0438\u0448\u043b\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438\u0437 AndroidX Fragment library. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0432\u0435\u0449\u044c:<\/p>\n<pre><code class=\"java\">ActivityResultLauncher&lt;String> mGetContent = registerForActivityResult(new GetContent(),     new ActivityResultCallback&lt;Uri>() {         @Override         public void onActivityResult(Uri uri) {             \/\/ Handle the returned Uri         } });  @Override public void onCreate(@Nullable savedInstanceState: Bundle) {     \/\/ ...      Button selectButton = findViewById(R.id.select_button);      selectButton.setOnClickListener(new OnClickListener() {         @Override         public void onClick(View view) {             \/\/ Pass in the mime type you'd like to allow the user to select             \/\/ as the input             mGetContent.launch(\"image\/*\");         }     }); } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/habr.com\/ru\/company\/e-Legion\/blog\/545934\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 API. \u041d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443 \u043d\u0430\u0441, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>registerForActivityResult<\/b> \u043d\u0443\u0436\u043d\u043e \u044e\u043d\u0438\u0442\u0435\u0432\u0441\u043a\u0438\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438 \u043a\u0430\u0441\u0442\u0430\u043d\u0443\u0442\u044c \u0432 AppCompatActivity, \u0430 \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \ud83d\ude41 \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u2013 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c, \u0431\u0443\u0434\u0443 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u044f \u0441\u0442\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435-\u0434\u043e\u0431\u0440\u044b\u0435 <a href=\"https:\/\/developer.android.com\/guide\/components\/services\" rel=\"nofollow noopener noreferrer\">\u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/a>. \u0421\u0438\u043b\u044c\u043d\u043e \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0430\u043d\u0443\u0430\u043b \u0438\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 Github. \u0422\u0430\u043a \u0447\u0442\u043e, \u043f\u043e\u0435\u0445\u0430\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 Unity, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0443 UnityPlayer:<\/p>\n<pre><code class=\"java\">UnityPlayer.UnitySendMessage(object, receiver, data); <\/code><\/pre>\n<p>  <i>object<\/i> \u2013 \u0438\u043c\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0435 Unity<br \/>  <i>receiver<\/i> \u2013 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435<br \/>  <i>data<\/i> \u2013 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<p>  \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 AndroidManifest.xml, \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b \u043f\u043e\u0442\u043e\u043c \u043c\u0435\u0440\u0434\u0436\u0430\u0442\u0441\u044f \u043f\u0440\u0438 \u0431\u0438\u043b\u0434\u0435. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435. \u041f\u0430\u043f\u043a\u0443 <i>Plugins\/Android\/res<\/i> \u0432 Unity \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0443\u0436\u0435 \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/52\/l6\/be\/52l6befh0ihuujtpryv_6uigv-e.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/52\/l6\/be\/52l6befh0ihuujtpryv_6uigv-e.png\"\/><\/p>\n<p>  \u0412 Gradle \u0444\u0430\u0439\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Firebase \u0438\u043b\u0438 \u0435\u0449\u0451 \u0447\u0442\u043e-\u0442\u043e. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 Unity. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c UnityPlayer.currentActivity, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 Unity.<\/p>\n<p>  \u0424\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 Unity \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 MacOS. \u0414\u043b\u044f Windows \u043f\u0443\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<pre><code class=\"bash\">\/Applications\/Unity\/Hub\/Editor\/&lt;YOUR_UNITY_VERSION>\/PlaybackEngines\/AndroidPlayer\/Variations\/&lt;mono|il2cpp>\/Release\/Classes\/classes.jar  <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <b>libs<\/b> \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438 \u0432 Gradle \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"java\">implementation fileTree(dir: 'libs', include: ['*.jar']) <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"java\">implementation project(':mylibrary') <\/code><\/pre>\n<p>  \u0423 Gradle \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0435\u0439, \u044d\u0442\u043e \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0414\u043e\u0431\u0430\u0432\u043b\u044e \u043b\u0438\u0448\u044c, \u043a\u0430\u043a \u044f \u043a\u043e\u043f\u0438\u0440\u0443\u044e \u0432\u0441\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0432 \u043e\u0434\u043d\u0443 \u043f\u0430\u043f\u043a\u0443:<\/p>\n<pre><code class=\"java\"> task copyAAR(type: Copy) {         from 'build\/outputs\/aar'         into '..\/!Releases'         include '**\/*-release.aar'         rename project.name+'-release.aar', project.name.capitalize()+'.aar'     }      afterEvaluate {         assemble.finalizedBy(copyAAR)     } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0430\u0441\u043a\u0430 <b>Assemble<\/b> \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438, \u043e\u043d\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u0443 \u043f\u0430\u043f\u043a\u0443.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0433\u0430\u043b\u0435\u0440\u0435\u0438 \u0438 \u043a\u0430\u043c\u0435\u0440\u044b, \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430, \u0432\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 MediaService.java (\u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430 Github)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3r\/ag\/oj\/3ragojk046greal5pnvjv6bhwsm.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/3r\/ag\/oj\/3ragojk046greal5pnvjv6bhwsm.png\"\/><\/p>\n<p>  \u0422\u0443\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439, \u0433\u0430\u043b\u0435\u0440\u0435\u0435\u0439 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435. \u0412 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430) \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 Unity \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"xml\">&lt;manifest xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\" package=\"com.mopsicus.images\">     &lt;application>         &lt;service android:name=\".MediaService\">&lt;\/service>     &lt;\/application> &lt;\/manifest> <\/code><\/pre>\n<p>  \u0415\u0449\u0451 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d-\u0445\u0435\u043b\u043f\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Unity, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0435\u043d\u043e \u0442\u0430\u043c \ud83d\ude42 \u0412 \u0445\u0435\u043b\u043f\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 JSON \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0432 Unity.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/w4\/ju\/tk\/w4jutkzk2mjtxtzbqmmiydwalbq.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/w4\/ju\/tk\/w4jutkzk2mjtxtzbqmmiydwalbq.png\"\/><\/p>\n<p>  \u0425\u043e\u0442\u044f, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u043c\u0435\u0442\u043e\u0434 \u043a\u0443\u0434\u0430 \u043e\u0442\u0441\u044b\u043b\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432.<\/p>\n<p>  \u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0442\u0435\u043c\u0443 Android \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f onActivityResult \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u0441\u0442\u0430\u0440\u044b\u0435, \u0430 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u043e onActivityResult \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0432 \u0442.\u043d. \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0435. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041d\u043e \u0442.\u043a. \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0433\u0430\u043b\u0435\u0440\u0435\u0438, \u0442\u043e \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0443\u0434\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/y9\/da\/xc\/y9daxcd8f-horzqcdix8pqflsgc.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/y9\/da\/xc\/y9daxcd8f-horzqcdix8pqflsgc.png\"\/><\/p>\n<p>  \u041f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 <b>UnityPlayerActivity<\/b> \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"xml\">&lt;application android:icon=\"@drawable\/app_icon\" android:label=\"@string\/app_name\" android:isGame=\"true\" android:theme=\"@android:style\/Theme.NoTitleBar.Fullscreen\" android:usesCleartextTraffic=\"true\">     &lt;activity android:name=\"com.mopsicus.base.Plugin\" android:label=\"@string\/app_name\" android:windowSoftInputMode=\"adjustNothing\">         &lt;intent-filter>             &lt;action android:name=\"android.intent.action.MAIN\" \/>             &lt;category android:name=\"android.intent.category.LAUNCHER\" \/>             &lt;category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" \/>         &lt;\/intent-filter>         ...     &lt;\/activity> &lt;\/application>  <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f Activity, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<h3>iOS \u043f\u043b\u0430\u0433\u0438\u043d\u044b<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e iOS \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043b\u0435\u0433\u0447\u0435! \u0422\u0443\u0442 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043a\u0438, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u2013 \u043b\u0435\u0433\u0447\u0435. \u042f \u043f\u0438\u0448\u0443 \u043d\u0430 Objective-C, \u0434\u0430 \u044d\u0442\u043e \u043e\u043b\u0434\u0441\u043a\u0443\u043b\u043b, \u043d\u043e \u043d\u0430 \u0447\u0451\u043c \u0437\u043d\u0430\u044e, \u043d\u0430 \u0442\u043e\u043c \u0438 \u043f\u0438\u0448\u0443. <\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 <b>NSObject<\/b> \u0438\u043b\u0438 <b>UIViewController<\/b>, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ss\/6h\/ma\/ss6hmarkedrprhjixpdzoqjivqo.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ss\/6h\/ma\/ss6hmarkedrprhjixpdzoqjivqo.png\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">#include \"Common.h\"  static NSString *name = @\"share\";  @interface Share : UIViewController;  - (id)init;  - (void)text:(NSString *)data; @end  @implementation Share;  - (id)init {     return [super init]; }  - (void)text:(NSString *)data {     NSArray *items = [NSArray arrayWithObjects:data, nil];     UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];     if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {         controller.modalPresentationStyle = UIModalPresentationPopover;         controller.popoverPresentationController.sourceView = self.view;     } else {         controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical;     }     [UnityGetGLViewController() presentViewController:controller animated:YES completion:nil]; }  static Share *share = NULL;  extern \"C\" {  void shareText(const char *data) {     if (share == NULL) {         share = [[Share alloc] init];     }     [share text:[NSString stringWithUTF8String:data]]; }  }  @end <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0445\u0435\u043b\u043f\u0435\u0440 (\u0442\u0443\u0442 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e \u0432\u0435\u0437\u0434\u0435 \u0441\u0440\u0430\u0437\u0443) \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Unity, \u043f\u043e\u0442\u043e\u043c \u0438\u0434\u0451\u0442 \u0441\u0430\u043c \u043f\u043b\u0430\u0433\u0438\u043d \u0441 \u043e\u0434\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0431\u043b\u043e\u043a \u043d\u0430 \u0421, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 Unity.<\/p>\n<p>  \u0418\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0442\u0443\u0442 <b>UnityGetGLViewController()<\/b> \u2013 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 Unity \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041a\u0430\u043a <i>UnityPlayer.currentActivity<\/i> \u0432 Android \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e. \u0412 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c Xcode \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <b>Classes<\/b> \u0438 \u043f\u043e\u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \ud83d\ude42 \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b\u044b UnityAppController.mm \u0438\u043b\u0438 UnityInterface.h.<\/p>\n<p>  \u041b\u0443\u0447\u0448\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u043f\u043b\u0430\u0433\u0438\u043d \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u0438 \u0433\u0430\u043b\u0435\u0440\u0435\u0435\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/se\/qe\/lh\/seqelhdlrf43x14uwlimzerdvmq.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/se\/qe\/lh\/seqelhdlrf43x14uwlimzerdvmq.png\"\/><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">#import &lt;UIKit\/UIKit.h> #import &lt;Foundation\/Foundation.h> #import &lt;AssetsLibrary\/AssetsLibrary.h> #import &lt;AVFoundation\/AVFoundation.h> #include \"Common.h\"  static NSString *name = @\"images\";  @interface Images : UIViewController &lt;UIImagePickerControllerDelegate, UINavigationControllerDelegate> - (id)init;  - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info;  - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;  - (UIImage *)normalizeOrientation:(UIImage *)image;  - (void)saveToLibrary:(NSString *)fileName;  - (void)requestPermission;  - (void)checkAndCapture;  - (void)captureImage; @end  @implementation Images  - (id)init {     return [super init]; }  - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {     UIImage *image = (picker.sourceType == UIImagePickerControllerSourceTypeCamera) ? [info objectForKey:UIImagePickerControllerOriginalImage] : [self normalizeOrientation:[info objectForKey:UIImagePickerControllerOriginalImage]];     NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:@\"image.jpg\"];     NSData *data = UIImageJPEGRepresentation(image, 0.9);     [data writeToFile:path atomically:YES];     int degree = [self getOrientationAngle:image.imageOrientation];     NSMutableDictionary *json = [[NSMutableDictionary alloc] init];     [json setValue:path forKey:@\"path\"];     [json setValue:[NSNumber numberWithInt:degree] forKey:@\"degree\"];     NSString *result = [Common dictToJson:json];     [Common sendData:name data:result];     [UnityGetGLViewController() dismissViewControllerAnimated:YES completion:nil]; }  - (int)getOrientationAngle:(UIImageOrientation)orientation {     switch (orientation) {         case UIImageOrientationRight:             return 90;         case UIImageOrientationDown:             return 180;         case UIImageOrientationLeft:             return 270;         default:             return 0;     } }  - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {     [UnityGetGLViewController() dismissViewControllerAnimated:YES completion:nil]; }  - (UIImage *)normalizeOrientation:(UIImage *)image {     if (image.imageOrientation == UIImageOrientationUp) {         return image;     }     UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale);     [image drawInRect:(CGRect) {0, 0, image.size}];     UIImage *normalizedImage = UIGraphicsGetImageFromCurrentImageContext();     UIGraphicsEndImageContext();     return normalizedImage; }  - (void)saveToLibrary:(NSString *)filePath {     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{         NSData *imgData = [NSData dataWithContentsOfFile:filePath];         UIImage *image = [[UIImage alloc] initWithData:imgData];         UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);     }); }  - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo: (void *)contextInfo {     if (error) {         [Common sendError:name code:@\"SAVE_ERROR\"];     } else {         NSMutableDictionary *json = [[NSMutableDictionary alloc] init];         [json setValue:@\"SAVE_SUCCESS\" forKey:@\"path\"];         [json setValue:[NSNumber numberWithInt:-1] forKey:@\"degree\"];         NSString *result = [Common dictToJson:json];         [Common sendData:name data:result];     } }  - (void)requestPermission {     [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {         if (!granted) {             [Common sendError:name code:@\"NO_PERMISSION\"];         } else {             dispatch_async(dispatch_get_main_queue(), ^{                 [self captureImage];             });         }     }]; }  - (void)checkAndCapture {     AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];     switch (status) {         case AVAuthorizationStatusAuthorized:             [self captureImage];             break;         case AVAuthorizationStatusDenied:         case AVAuthorizationStatusRestricted:             [Common sendError:name code:@\"NO_PERMISSION\"];             break;         case AVAuthorizationStatusNotDetermined:             [self requestPermission];             break;         default:             [Common sendError:name code:@\"IMAGE_ERROR\"];             break;     } }  - (void)captureImage {     UIImagePickerController *picker = [[UIImagePickerController alloc] init];     picker.delegate = self;     picker.sourceType = UIImagePickerControllerSourceTypeCamera;     picker.allowsEditing = NO;     picker.showsCameraControls = YES;     [UnityGetGLViewController() presentViewController:picker animated:YES completion:nil]; }  @end  static Images *images = NULL;  extern \"C\" {  void imagesPick() {     if (images == NULL) {         images = [[Images alloc] init];     }     UIImagePickerController *picker = [[UIImagePickerController alloc] init];     picker.delegate = images;     if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) {         picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;     } else {         picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;     }     picker.allowsEditing = NO;     [UnityGetGLViewController() presentViewController:picker animated:YES completion:nil]; }   void imagesCapture() {     if (images == NULL) {         images = [[Images alloc] init];     }     [images checkAndCapture]; }   void imagesSave(const char *filePath) {     if (images == NULL) {         images = [[Images alloc] init];     }     [images saveToLibrary:[NSString stringWithUTF8String:filePath]]; }  void imagesSettings(){     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil]; }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0443\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 UIViewController \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0434\u043b\u044f ImagePicker&#8217;\u0430 \u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0430. \u041c\u0435\u0442\u043e\u0434 <b>didFinishPickingMediaWithInfo<\/b> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435. \u0422\u0430\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430, \u0435\u0441\u043b\u0438 \u0438\u0437 \u0433\u0430\u043b\u0435\u0440\u0435\u0438 \u0442\u043e \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u0418 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 Unity \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0443\u0433\u043e\u043b.<\/p>\n<p>  \u0422\u0430\u043c \u0433\u0434\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043c\u0435\u0440\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u0432\u0441\u0451 \u043d\u043e\u0440\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2013 \u0442\u043e \u043e\u0442\u0432\u0435\u0442 (NO_PERMISSION) \u043f\u0440\u0438\u0434\u0451\u0442 \u0432 Unity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vd\/zr\/fq\/vdzrfqjnnar3yqktq5j1ow1d_eu.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/vd\/zr\/fq\/vdzrfqjnnar3yqktq5j1ow1d_eu.png\"\/><\/p>\n<p>  \u0412\u044b\u0448\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u043a\u043b\u0430\u0441\u0441 UnityAppController.mm, \u0432 \u043d\u0451\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AppDelegate: didFinishLaunchingWithOptions, didReceiveRemoteNotification, openURL \u0438 \u0442.\u0434. \u0422\u0430\u043a \u0432\u043e\u0442 \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u0433\u043e \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e: <\/p>\n<pre><code class=\"cpp\">IMPL_APP_CONTROLLER_SUBCLASS(Push) <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">#import &lt;UIKit\/UIKit.h> #import &lt;Foundation\/Foundation.h> #import &lt;UserNotifications\/UserNotifications.h> #import \"UnityAppController.h\" #import \"Common.h\"  static NSString *name = @\"push\";  @interface Push : UnityAppController &lt;UNUserNotificationCenterDelegate> - (bool)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;  - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification;  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;  - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;  - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;  - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler;  - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler;  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; @end  @implementation Push  - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {     ... }  - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {     ... }  ...  - (bool)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {     ...     return [super application:application didFinishLaunchingWithOptions:launchOptions]; }  @end   extern \"C\" {      ...      }  IMPL_APP_CONTROLLER_SUBCLASS(Push) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 *.mm \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f: *.h \u0438 *.m. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443-\u043f\u043b\u0430\u0433\u0438\u043d. \u0412 Xcode \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 <b>Static Library<\/b>, \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0431\u0438\u043b\u0434. \u041a\u0430\u043a \u0438 \u0432\u0441\u0435 iOS \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 <b>Plugins\/iOS<\/b>.<\/p>\n<p>  \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a. \u042d\u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u043f\u043e\u0434 iOS. \u0422.\u0435. \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439: \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 -> \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043c\u0430\u043d\u0443\u0430\u043b, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Obj-c \u0438\u043b\u0438 Swift -> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 -> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u044f\u043d\u043a\u0443, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u043a\u043e\u043b\u043b\u0431\u0435\u043a\u0438 -> \u043f\u0440\u043e\u0444\u0438\u0442.<\/p>\n<p>  \u0427\u0443\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u043b \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e <a href=\"https:\/\/github.com\/googlesamples\/unity-jar-resolver\" rel=\"nofollow noopener noreferrer\">External Dependency Manager for Unity<\/a>. \u042d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Android \u0438 \u043f\u043e\u0434\u0441\u044b (cocoapod) \u0434\u043b\u044f iOS. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 Editor \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c XML \u0444\u0430\u0439\u043b \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u0442\u044c \u043d\u0430 Github \u0438\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041d\u0430 Github \u044f \u043e\u0431\u043d\u043e\u0432\u0438\u043b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 <a href=\"https:\/\/github.com\/mopsicus\/unity-plugin-system\" rel=\"nofollow noopener noreferrer\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438<\/a> \u0432\u0441\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0440\u0435\u043c\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c. <\/p>\n<p>  \u041d\u0443 \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u0438 \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 \ud83d\ude42<\/p><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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:\/\/habr.com\/ru\/articles\/581160\/\"> https:\/\/habr.com\/ru\/articles\/581160\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\u0415\u0441\u0442\u044c \u043a\u0443\u0447\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439 \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 Unity \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0411\u0430\u043d\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440, \u0432 Unity \u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0430\u043b\u0435\u0440\u0435\u0439 \u0438 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e Unity \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u043d\u043e 60-70% \u0432\u0441\u0435\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0438\u0433\u0440, \u043a\u0430\u043a \u0431\u044b \u0433\u043e\u0432\u043e\u0440\u044f\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/30\/32\/ff\/3032ffvfanu_beevddaermppcmm.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/30\/32\/ff\/3032ffvfanu_beevddaermppcmm.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-393293","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393293","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=393293"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/393293\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=393293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=393293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}