{"id":468237,"date":"2025-07-22T15:02:13","date_gmt":"2025-07-22T15:02:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468237"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468237","title":{"rendered":"<span>\u041a\u043e\u0433\u0434\u0430 \u043c\u0438\u0440 \u0442\u0435\u043c\u043d\u0435\u0435\u0442: \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 VR\u2011\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u043e\u0432\u0438\u0434\u044f\u0449\u0438\u0445 \u2014 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OpenXR \u0438 Unity, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 C#. \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0436\u0438\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u044e\u043c\u043e\u0440, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u0441\u043d\u0443\u043b \u0432 \u043f\u043e\u043b\u0443\u043c\u0440\u0430\u043a\u0435 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041c\u0438\u0440 VR \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0447\u043a\u0438 \u00ab\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0435\u0435: \u043e\u043a\u043e\u043b\u043e 285\u202f\u043c\u043b\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432\u043e \u0432\u0441\u0451\u043c \u043c\u0438\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0437\u0440\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0438\u0440\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0435\u0435: \u043e\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0430 \u0434\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/161\/448\/026\/16144802643a06173471ea8319cbaf3c.png\" width=\"819\" height=\"819\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/161\/448\/026\/16144802643a06173471ea8319cbaf3c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/161\/448\/026\/16144802643a06173471ea8319cbaf3c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<blockquote>\n<p><em>\u00ab\u0410\u0432\u0442\u043e\u0440 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u043a\u043d\u043e\u043f\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u043d\u043e\u0441\u043e\u0440\u043e\u0433\u043e\u0432 \u043e\u043d \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u0430 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u043f\u044f\u0442\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u043d \u0440\u0435\u0448\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441&#8230;\u00bb<\/em><\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/strong> \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c VR\u2011\u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/strong> \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u044b, \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 OpenXR, Unity 2021+ (\u0438\u043b\u0438 Unreal, \u043d\u043e \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 Unity).<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0438\u0437\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong> \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u00ab\u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c\u00bb \u0444\u0440\u0435\u0439\u043c\u0440\u0435\u0439\u0442 \u043d\u0430 \u0441\u043b\u0430\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/h3>\n<p>Unity c OpenXR SDK \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>OpenXR \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 API \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0448\u043b\u0435\u043c\u043e\u0432 (Quest, Vive, Valve Index).<\/p>\n<\/li>\n<li>\n<p>Unity \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c UI \u0447\u0435\u0440\u0435\u0437 Canvas \u0438 TextMeshPro.<\/p>\n<\/li>\n<li>\n<p>C#\u2011\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\n<p><strong>Input Monitor<\/strong> \u2014 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>Vision Profile Detector<\/strong> \u2014 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 (\u0446\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u0441\u043b\u0435\u043f\u043e\u0442\u0430, \u0441\u043b\u0430\u0431\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442).<\/p>\n<\/li>\n<li>\n<p><strong>UI Adapter<\/strong> \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a Canvas\/UI.<\/p>\n<\/li>\n<li>\n<p><strong>Analytics Logger<\/strong> \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043a \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u0437\u0440\u0435\u043d\u0438\u044e<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u2011\u0447\u0435\u043b\u043b\u0435\u043d\u0434\u0436\u0435\u0439: \u00ab\u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0443\u0431 \u043d\u0430 \u0444\u043e\u043d\u0435 \u0441\u0435\u0440\u043e\u0433\u043e\u00bb, \u00ab\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 24 pt\u00bb \u0438 \u0442.\u043f.<br \/>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 A \u2208 [0.5;2] \u0434\u043b\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 C \u2208 [0;1] \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (0 \u2014 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c, 1 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f).<\/p>\n<pre><code class=\"cs\">\/\/ \u042f\u0437\u044b\u043a: C#, Unity 2021.3+ \/\/ \u041c\u043e\u0434\u0443\u043b\u044c VisionProfileDetector.cs using UnityEngine; using System.IO;  public class VisionProfileDetector : MonoBehaviour {     public float scaleFactor = 1f;     public float contrastFactor = 0f;      private readonly string profilePath = Application.persistentDataPath + \"\/visionProfile.json\";      void Start()     {         if (File.Exists(profilePath))             LoadProfile();         else             RunInitialTests();                  ApplyProfile();     }      void RunInitialTests()     {         scaleFactor = 1.2f; \/\/ \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u0448\u0440\u0438\u0444\u0442         contrastFactor = 0.3f;         SaveProfile();     }      void LoadProfile()     {         var json = File.ReadAllText(profilePath);         var profile = JsonUtility.FromJson&lt;VisionProfile&gt;(json);         scaleFactor = profile.scaleFactor;         contrastFactor = profile.contrastFactor;     }      void SaveProfile()     {         var profile = new VisionProfile { scaleFactor = scaleFactor, contrastFactor = contrastFactor };         var json = JsonUtility.ToJson(profile);         File.WriteAllText(profilePath, json);     }      void ApplyProfile()     {         UIAdapter.Instance.SetScale(scaleFactor);         UIAdapter.Instance.SetContrast(contrastFactor);     } }  [System.Serializable] public class VisionProfile {     public float scaleFactor;     public float contrastFactor; }<\/code><\/pre>\n<hr\/>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e UI \u0432 Unity<\/h3>\n<p>\u0421\u0430\u043c\u0430\u044f \u0436\u0438\u0432\u043e\u0442\u0440\u0435\u043f\u0435\u0449\u0443\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f Canvas. \u0423\u0441\u043b\u043e\u0432\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 <code>AdaptiveCanvas<\/code>.<\/p>\n<pre><code class=\"cs\">\/\/ UIAdapter.cs using UnityEngine; using UnityEngine.UI; using TMPro;  public class UIAdapter : MonoBehaviour {     public static UIAdapter Instance;     public Canvas adaptiveCanvas;      void Awake()     {         if (Instance == null) Instance = this;         else Destroy(gameObject);     }      public void SetScale(float factor)     {         adaptiveCanvas.transform.localScale = Vector3.one * factor;     }      public void SetContrast(float c)     {         foreach (var img in adaptiveCanvas.GetComponentsInChildren&lt;Image&gt;())         {             var col = img.color;             col = Color.Lerp(col, Color.white, c * 0.5f);             img.color = col;         }          foreach (var txt in adaptiveCanvas.GetComponentsInChildren&lt;TextMeshProUGUI&gt;())         {             var s = txt.fontMaterial.GetFloat(ShaderUtilities.ID_FaceDilate);             txt.fontMaterial.SetFloat(ShaderUtilities.ID_FaceDilate, s + c * 0.2f);         }     } }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0441\u0438\u043b\u044c\u043d\u043e\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u00ab\u0440\u0435\u0437\u0430\u0442\u044c\u0441\u044f\u00bb \u043d\u0430 \u043a\u0440\u0430\u044f\u0445. \u041b\u0443\u0447\u0448\u0438\u0439 \u043b\u0430\u0439\u0444\u0445\u0430\u043a \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0440\u0433\u0438\u043d\u0430\u043b \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u043a\u0443 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<hr\/>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u044e \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 (gaze) \u043d\u0430 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442:<\/p>\n<pre><code class=\"cs\">\/\/ VoiceHint.cs using UnityEngine;  [RequireComponent(typeof(Collider))] public class VoiceHint : MonoBehaviour {     public AudioClip hintClip;     private AudioSource source;      void Start()     {         source = gameObject.AddComponent&lt;AudioSource&gt;();         source.clip = hintClip;         source.playOnAwake = false;     }      void OnPointerEnter() \/\/ \u0414\u043b\u044f gaze input \u0432 VR     {         source.Play();     } }<\/code><\/pre>\n<hr\/>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0440\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u043e Update() \u043f\u0440\u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b UI.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c LOD \u0434\u043b\u044f 3D\u2011\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044f\u0445).<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"cs\">\/\/ PerformanceOptimizer.cs using UnityEngine; using System.Collections;  public class PerformanceOptimizer : MonoBehaviour {     private CanvasGroup cg;      void Awake()     {         cg = GetComponent&lt;CanvasGroup&gt;();     }      public void SmoothFade(float targetAlpha, float duration)     {         StartCoroutine(FadeRoutine(targetAlpha, duration));     }      private IEnumerator FadeRoutine(float target, float time)     {         float start = cg.alpha;         float elapsed = 0f;         while (elapsed &lt; time)         {             cg.alpha = Mathf.Lerp(start, target, elapsed \/ time);             elapsed += Time.deltaTime;             yield return null;         }         cg.alpha = target;     } }<\/code><\/pre>\n<hr\/>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432 \u0438 \u0430\u0432\u0442\u043e\u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u043a\u043e\u043d.<\/p>\n<pre><code class=\"cs\">\/\/ SubtitleManager.cs using UnityEngine; using TMPro; using System.Collections;  public class SubtitleManager : MonoBehaviour {     public TextMeshProUGUI subtitleText;     public float displayTime = 3f;      public void ShowSubtitle(string message)     {         StopAllCoroutines();         StartCoroutine(DisplayRoutine(message));     }      private IEnumerator DisplayRoutine(string msg)     {         subtitleText.text = msg;         subtitleText.alpha = 1f;         yield return new WaitForSeconds(displayTime);         float elapsed = 0f;         while (elapsed &lt; 1f)         {             subtitleText.alpha = Mathf.Lerp(1f, 0f, elapsed \/ 1f);             elapsed += Time.deltaTime;             yield return null;         }         subtitleText.alpha = 0f;     } }<\/code><\/pre>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u043d\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043c\u043e\u0434\u044b, \u0430 \u043f\u0443\u0442\u044c \u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u043e\u0432\u0438\u0434\u044f\u0449\u0438\u0445 \u0432 VR \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u043c \u043f\u0440\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445: \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u0430\u0440\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430 C#, \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u0448\u0443\u0442\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 \u2014 \u0438 \u043c\u0438\u0440 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u0435\u0442\u043b\u0435\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u043d\u0435 \u0431\u043e\u0439\u0442\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445. \u0418 \u0434\u0430, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Easter egg \u2014 \u0442\u0430\u0439\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u00ab\u043a\u0440\u0443\u043f\u043d\u0430\u044f Comic Sans\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435.<\/p>\n<\/blockquote>\n<\/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\/930032\/\"> https:\/\/habr.com\/ru\/articles\/930032\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OpenXR \u0438 Unity, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 C#. \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0436\u0438\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0438 \u044e\u043c\u043e\u0440, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u0441\u043d\u0443\u043b \u0432 \u043f\u043e\u043b\u0443\u043c\u0440\u0430\u043a\u0435 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041c\u0438\u0440 VR \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0447\u043a\u0438 \u00ab\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0435\u0435: \u043e\u043a\u043e\u043b\u043e 285\u202f\u043c\u043b\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432\u043e \u0432\u0441\u0451\u043c \u043c\u0438\u0440\u0435 \u0438\u043c\u0435\u044e\u0442 \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0437\u0440\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0438\u0440\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0435\u0435: \u043e\u0442 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0430 \u0434\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<blockquote>\n<p><em>\u00ab\u0410\u0432\u0442\u043e\u0440 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u043a\u043d\u043e\u043f\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u043d\u043e\u0441\u043e\u0440\u043e\u0433\u043e\u0432 \u043e\u043d \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u0430 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u043f\u044f\u0442\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u043d \u0440\u0435\u0448\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441&#8230;\u00bb<\/em><\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/strong> \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c VR\u2011\u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/strong> \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u044b, \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442 \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 OpenXR, Unity 2021+ (\u0438\u043b\u0438 Unreal, \u043d\u043e \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 Unity).<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0438\u0437\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong> \u2014 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u00ab\u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c\u00bb \u0444\u0440\u0435\u0439\u043c\u0440\u0435\u0439\u0442 \u043d\u0430 \u0441\u043b\u0430\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/h3>\n<p>Unity c OpenXR SDK \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c:<\/p>\n<ul>\n<li>\n<p>OpenXR \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 API \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0448\u043b\u0435\u043c\u043e\u0432 (Quest, Vive, Valve Index).<\/p>\n<\/li>\n<li>\n<p>Unity \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c UI \u0447\u0435\u0440\u0435\u0437 Canvas \u0438 TextMeshPro.<\/p>\n<\/li>\n<li>\n<p>C#\u2011\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\n<p><strong>Input Monitor<\/strong> \u2014 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>Vision Profile Detector<\/strong> \u2014 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 (\u0446\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u0441\u043b\u0435\u043f\u043e\u0442\u0430, \u0441\u043b\u0430\u0431\u043e\u0435 \u0437\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442).<\/p>\n<\/li>\n<li>\n<p><strong>UI Adapter<\/strong> \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a Canvas\/UI.<\/p>\n<\/li>\n<li>\n<p><strong>Analytics Logger<\/strong> \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f \u043a \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u0437\u0440\u0435\u043d\u0438\u044e<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u2011\u0447\u0435\u043b\u043b\u0435\u043d\u0434\u0436\u0435\u0439: \u00ab\u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0443\u0431 \u043d\u0430 \u0444\u043e\u043d\u0435 \u0441\u0435\u0440\u043e\u0433\u043e\u00bb, \u00ab\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 24 pt\u00bb \u0438 \u0442.\u043f.<br \/>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 A \u2208 [0.5;2] \u0434\u043b\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 C \u2208 [0;1] \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (0 \u2014 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c, 1 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f).<\/p>\n<pre><code class=\"cs\">\/\/ \u042f\u0437\u044b\u043a: C#, Unity 2021.3+ \/\/ \u041c\u043e\u0434\u0443\u043b\u044c VisionProfileDetector.cs using UnityEngine; using System.IO;  public class VisionProfileDetector : MonoBehaviour {     public float scaleFactor = 1f;     public float contrastFactor = 0f;      private readonly string profilePath = Application.persistentDataPath + \"\/visionProfile.json\";      void Start()     {         if (File.Exists(profilePath))             LoadProfile();         else             RunInitialTests();                  ApplyProfile();     }      void RunInitialTests()     {         scaleFactor = 1.2f; \/\/ \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u0448\u0440\u0438\u0444\u0442         contrastFactor = 0.3f;         SaveProfile();     }      void LoadProfile()     {         var json = File.ReadAllText(profilePath);         var profile = JsonUtility.FromJson&lt;VisionProfile&gt;(json);         scaleFactor = profile.scaleFactor;         contrastFactor = profile.contrastFactor;     }      void SaveProfile()     {         var profile = new VisionProfile { scaleFactor = scaleFactor, contrastFactor = contrastFactor };         var json = JsonUtility.ToJson(profile);         File.WriteAllText(profilePath, json);     }      void ApplyProfile()     {         UIAdapter.Instance.SetScale(scaleFactor);         UIAdapter.Instance.SetContrast(contrastFactor);     } }  [System.Serializable] public class VisionProfile {     public float scaleFactor;     public float contrastFactor; }<\/code><\/pre>\n<hr\/>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e UI \u0432 Unity<\/h3>\n<p>\u0421\u0430\u043c\u0430\u044f \u0436\u0438\u0432\u043e\u0442\u0440\u0435\u043f\u0435\u0449\u0443\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044f Canvas. \u0423\u0441\u043b\u043e\u0432\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 <code>AdaptiveCanvas<\/code>.<\/p>\n<pre><code class=\"cs\">\/\/ UIAdapter.cs using UnityEngine; using UnityEngine.UI; using TMPro;  public class UIAdapter : MonoBehaviour {     public static UIAdapter Instance;     public Canvas adaptiveCanvas;      void Awake()     {         if (Instance == null) Instance = this;         else Destroy(gameObject);     }      public void SetScale(float factor)     {         adaptiveCanvas.transform.localScale = Vector3.one * factor;     }      public void SetContrast(float c)     {         foreach (var img in adaptiveCanvas.GetComponentsInChildren&lt;Image&gt;())         {             var col = img.color;             col = Color.Lerp(col, Color.white, c * 0.5f);             img.color = col;         }          foreach (var txt in adaptiveCanvas.GetComponentsInChildren&lt;TextMeshProUGUI&gt;())         {             var s = txt.fontMaterial.GetFloat(ShaderUtilities.ID_FaceDilate);             txt.fontMaterial.SetFloat(ShaderUtilities.ID_FaceDilate, s + c * 0.2f);         }     } }<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u0441\u0438\u043b\u044c\u043d\u043e\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u00ab\u0440\u0435\u0437\u0430\u0442\u044c\u0441\u044f\u00bb \u043d\u0430 \u043a\u0440\u0430\u044f\u0445. \u041b\u0443\u0447\u0448\u0438\u0439 \u043b\u0430\u0439\u0444\u0445\u0430\u043a \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0440\u0433\u0438\u043d\u0430\u043b \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u043a\u0443 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435.<\/p>\n<hr\/>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u044e \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 (gaze) \u043d\u0430 UI\u2011\u044d\u043b\u0435\u043c\u0435\u043d\u0442:<\/p>\n<pre><code class=\"cs\">\/\/ VoiceHint.cs using UnityEngine;  [RequireComponent(typeof(Collider))] public class VoiceHint : MonoBehaviour {     public AudioClip hintClip;     private AudioSource source;      void Start()     {         source = gameObject.AddComponent&lt;AudioSource&gt;();         source.clip = hintClip;         source.playOnAwake = false;     }      void OnPointerEnter() \/\/ \u0414\u043b\u044f gaze input \u0432 VR     {         source.Play();     } }<\/code><\/pre>\n<hr\/>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0440\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u043e Update() \u043f\u0440\u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b UI.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c LOD \u0434\u043b\u044f 3D\u2011\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044f\u0445).<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"cs\">\/\/ PerformanceOptimizer.cs using UnityEngine; using System.Collections;  public class PerformanceOptimizer : MonoBehaviour {     private CanvasGroup cg;      void Awake()     {         cg = GetComponent&lt;CanvasGroup&gt;();     }      public void SmoothFade(float targetAlpha, float duration)     {         StartCoroutine(FadeRoutine(targetAlpha, duration));     }      private IEnumerator FadeRoutine(float target, float time)     {         float start = cg.alpha;         float elapsed = 0f;         while (elapsed &lt; time)         {             cg.alpha = Mathf.Lerp(start, target, elapsed \/ time);             elapsed += Time.deltaTime;             yield return null;         }         cg.alpha = target;     } }<\/code><\/pre>\n<hr\/>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432 \u0438 \u0430\u0432\u0442\u043e\u0441\u043a\u0435\u0439\u043b\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u043a\u043e\u043d.<\/p>\n<pre><code class=\"cs\">\/\/ SubtitleManager.cs using UnityEngine; using TMPro; using System.Collections;  public class SubtitleManager : MonoBehaviour {     public TextMeshProUGUI subtitleText;     public float displayTime = 3f;      public void ShowSubtitle(string message)     {         StopAllCoroutines();         StartCoroutine(DisplayRoutine(message));     }      private IEnumerator DisplayRoutine(string msg)     {         subtitleText.text = msg;         subtitleText.alpha = 1f;         yield return new WaitForSeconds(displayTime);         float elapsed = 0f;         while (elapsed &lt; 1f)         {             subtitleText.alpha = Mathf.Lerp(1f, 0f, elapsed \/ 1f);             elapsed += Time.deltaTime;             yield return null;         }         subtitleText.alpha = 0f;     } }<\/code><\/pre>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u043d\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043c\u043e\u0434\u044b, \u0430 \u043f\u0443\u0442\u044c \u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u043e\u0432\u0438\u0434\u044f\u0449\u0438\u0445 \u0432 VR \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u043c \u043f\u0440\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445: \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u0430\u0440\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430 C#, \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u0448\u0443\u0442\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 \u2014 \u0438 \u043c\u0438\u0440 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u0435\u0442\u043b\u0435\u0435.<\/p>\n<blockquote>\n<p><strong>\u0421\u043e\u0432\u0435\u0442:<\/strong> \u043d\u0435 \u0431\u043e\u0439\u0442\u0435\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445. \u0418 \u0434\u0430, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Easter egg \u2014 \u0442\u0430\u0439\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u00ab\u043a\u0440\u0443\u043f\u043d\u0430\u044f Comic Sans\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435.<\/p>\n<\/blockquote>\n<\/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\/930032\/\"> https:\/\/habr.com\/ru\/articles\/930032\/<\/a><br \/><\/br><\/br><\/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-468237","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468237","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=468237"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468237\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}