{"id":471660,"date":"2025-08-22T15:01:57","date_gmt":"2025-08-22T15:01:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=471660"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=471660","title":{"rendered":"<span>\u041a\u043e\u043f\u0430\u0435\u043c\u0441\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Unity VR \u0438\u0433\u0440. \u0427\u0430\u0441\u0442\u044c 1: RocketMan<\/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>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0443 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438 VR-\u0438\u0433\u0440\u0430\u043c\u0438, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio. \u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c, RocketMan!<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/013\/88f\/7c7\/01388f7c7266e123d77174e8ca75f1a2.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/013\/88f\/7c7\/01388f7c7266e123d77174e8ca75f1a2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/013\/88f\/7c7\/01388f7c7266e123d77174e8ca75f1a2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041e \u0438\u0433\u0440\u0435<\/h3>\n<p><a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\" rel=\"noopener noreferrer nofollow\">RocketMan<\/a> \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0433\u0440\u0430-\u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430. \u041f\u043e \u043b\u043e\u0440\u0443 \u0432\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441\u0431\u0435\u0436\u0430\u0442\u044c \u0441 \u043f\u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u043d\u0430 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u043a\u0435\u0442\u0435, \u043d\u043e \u0432\u0441\u0451 \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a: \u0440\u0430\u043a\u0435\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u044b\u0448\u043b\u0438 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f, \u0432\u0441\u0435 \u043e\u0442\u0441\u0435\u043a\u0438 \u0437\u0430\u043f\u0435\u0440\u0442\u044b, \u0430 \u0432\u044b \u0437\u0430\u0441\u0442\u0440\u044f\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043b\u043e\u0432\u0443\u0448\u043a\u0438, \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0434\u0438\u043d \u043e\u0442\u0441\u0435\u043a \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u0440\u0430\u043a\u0435\u0442\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0443\u043b\u0435\u0442\u0435\u0442\u044c!<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/import.viva64.com\/docx\/blog\/1278_RocketManAnalysis_ru\/image2.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/import.viva64.com\/docx\/blog\/1278_RocketManAnalysis_ru\/image2.png 780w,&#10;       https:\/\/import.viva64.com\/docx\/blog\/1278_RocketManAnalysis_ru\/image2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418\u043c\u0435\u044f \u0432 \u0441\u0432\u043e\u0451\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 VR-\u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443, \u044f \u0441\u0430\u043c \u0441\u044b\u0433\u0440\u0430\u043b \u0432 \u0438\u0433\u0440\u0443 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043c\u043e\u0446\u0438\u0438, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443, \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0438 \u043e\u0434\u043d\u0443 \u0432\u043d\u0435\u043f\u043b\u0430\u043d\u043e\u0432\u0443\u044e \u044d\u0432\u0430\u043a\u0443\u0430\u0446\u0438\u044e \u0438\u0437 \u0440\u0430\u043a\u0435\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \ud83d\ude42<\/p>\n<p>\u041f\u043e \u0433\u0435\u0439\u043c\u043f\u043b\u0435\u044e \u0432 \u0438\u0433\u0440\u0435, \u043a\u0430\u043a \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0434\u043e \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430 \u043d\u0430 \u043f\u043b\u0430\u043d\u0435\u0442\u0435, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u0431\u0435\u0436\u0430\u0442\u044c. \u0415\u0449\u0451 \u043a\u0440\u0443\u0447\u0435 \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043a \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0433\u043d\u0435\u0442\u0430\u044e\u0449\u0438\u0435 \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439, \u0443\u0447\u0430\u0449\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u043d\u0446\u0443. \u0410 \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0431\u044b \u0432\u044b? \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0438\u0433\u0440\u043e\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0432 \u0435\u0451 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio? \u041d\u043e \u043f\u043e\u0433\u043e\u0434\u0438\u0442\u0435, \u0430 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 PVS-Studio?<\/p>\n<h3>O PVS-Studio<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u0441\u043b\u044b\u0448\u0438\u0442\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435, PVS-Studio \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 C#, Java, C \u0438\u043b\u0438 \u0421++ \u0431\u0435\u0437 \u0435\u0433\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u044f \u0433\u043e\u0432\u043e\u0440\u044e &#171;\u043a\u043e\u0434&#187;, \u0442\u043e \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u0438 \u0446\u0435\u043b\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u2014 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 PVS-Studio \u0443\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0435 \u043a\u043e\u0434\u0430 Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 API \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d UnityEngine, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 API. \u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0432\u044b\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 \u0442\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u0430\u043a <code>Update<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0447\u0451\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e\/\u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e Unity-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441 <code>null<\/code>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0438\u0433\u0440\u0435, \u0447\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c null-\u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/0744\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0441\u0442\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 Unity<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/1236\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Unity: \u043d\u043e\u0432\u044b\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 IDE (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e Visual Studio);<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435 IDE \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/ed0\/a95\/40d\/ed0a9540df99f19d70384cb21f4379a9.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/ed0\/a95\/40d\/ed0a9540df99f19d70384cb21f4379a9.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/ed0\/a95\/40d\/ed0a9540df99f19d70384cb21f4379a9.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<ul>\n<li>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/d8a\/0b4\/63d\/d8a0b463d6f21aa44d58a88f789f49f4.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/d8a\/0b4\/63d\/d8a0b463d6f21aa44d58a88f789f49f4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/d8a\/0b4\/63d\/d8a0b463d6f21aa44d58a88f789f49f4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e\u0433\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0032\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a> \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6607\/?ysclid=md8hmmtsug555878439\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442\u0435<\/a>. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0438\u0433\u0440\u044b.<\/p>\n<h3>\u041e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435<\/h3>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0433\u0440\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0430 \u043c\u043e\u0436\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0438\u0448\u0443\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u0434, \u043d\u043e \u044f\u0432\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u0434\u0435 \u0438\u0433\u0440\u044b \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041a\u0440\u043e\u043c\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0442\u043e\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f.<\/p>\n<p>\u041a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u0438\u0432\u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b Oculus, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f VR-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0438\u0445, \u0445\u043e\u0442\u044c \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0435 VR-API. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043e\u0434 \u043d\u0430\u043c \u0441 \u0432\u0430\u043c\u0438 \u043d\u0435 \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043a\u0438\u043b\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438 \u043d\u0435 \u043f\u043e\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \ud83d\ude42<\/p>\n<h4>\u041e\u0431\u0437\u043e\u0440 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<h3>\u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440<\/h3>\n<pre><code class=\"cs\">public void InsertChar(string c)  {   ....   waiter(); \/\/avoid double button clicks } IEnumerator waiter() {   yield return new WaitForSecondsRealtime(2); } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3206\/\" rel=\"noopener noreferrer nofollow\">V3206<\/a> Unity Engine. A direct call to the &#8216;waiter&#8217; coroutine-like method will not start it. Use the &#8216;StartCoroutine&#8217; method instead. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Scripts\/Tutorial\/Keyboard_Tuto.cs#L26\" rel=\"noopener noreferrer nofollow\">Keyboard_Tuto.cs 26<\/a>.<\/p>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>InsertChar<\/code> \u0435\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 &#8216;waiter&#8217;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0432\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u041d\u0430 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>waiter<\/code> \u2014 <code>new WaitForSecondsRealtime(2)<\/code>.<\/p>\n<p>\u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0436\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d \u043e\u0431\u044a\u0435\u043a\u0442-\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u0442\u0435\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u0441\u0435 \u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>waiter().MoveNext()<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 <code>new WaitForSecondsRealtime(2)<\/code> \u043d\u0435 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440-\u0442\u0430\u0439\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0443 \u043d\u0435\u0433\u043e &#8216;MoveNext&#8217; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u043f\u0440\u043e\u0448\u0451\u043b \u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0440\u0435\u0437\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>InsertChar<\/code> \u0438\u0437-\u0437\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">bool _disableInsertChar = false; public void InsertChar(string c)  {   if (_disableInsertChar)     return;   ....   StartCoroutine(waiter());  } IEnumerator waiter() {   _disableInsertChar = true;   yield return new WaitForSecondsRealtime(2);   _disableInsertChar = false; } <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430 Unity, \u0442.\u043a. \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u0438\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u0435\u0442\u043e\u0434\u0443 <code>StartCoroutine<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>new WaitForSecondsRealtime(2)<\/code> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0430 \u0434\u0432\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (\u0442.\u043a. \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430\u0445).<\/p>\n<p>\u041d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 <code>_disableInsertChar<\/code> \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0432 <code>true<\/code> \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u0438 \u0432 <code>false<\/code> \u2014 \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u0434\u0432\u0443\u0445 \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b. \u0412 \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>InsertChar<\/code> \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 <code>_disableInsertChar<\/code> \u0440\u0430\u0432\u0435\u043d <code>true<\/code>.<\/p>\n<h3>\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u0432\u0432\u0438\u0434\u0443 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f<\/h3>\n<pre><code class=\"cs\">public class OVRTrackedKeyboard : MonoBehaviour {   ....   public Transform ActiveKeyboardTransform;   .... }  public class OVRTrackedKeyboardHands : MonoBehaviour {   ....   private void LateUpdate()   {     ....     var position = KeyboardTracker.ActiveKeyboardTransform?.position;     var rotation = KeyboardTracker.ActiveKeyboardTransform?.rotation;     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3216\/\" rel=\"noopener noreferrer nofollow\">V3216<\/a> [CWE-754] Unity Engine. Checking the &#8216;ActiveKeyboardTransform&#8217; field with a specific Unity Engine type for null with &#8216;?.&#8217; may not work correctly due to implicit field initialization by the engine. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/VR\/Scripts\/OVRTrackedKeyboard\/OVRTrackedKeyboardHands.cs#L296\" rel=\"noopener noreferrer nofollow\">OVRTrackedKeyboardHands.cs 296<\/a>.<\/p>\n<p>\u042d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u043c, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0435: \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c-\u043f\u0443\u0441\u0442\u044b\u0448\u043a\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0441 \u0442\u0438\u043f\u043e\u043c <code>UnityEngine.Object<\/code> \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u043c \u043e\u0442 \u043d\u0435\u0433\u043e (\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <code>MonoBehaviour<\/code>, <code>ScriptableObject<\/code>).<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043b\u0430\u0434\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c <code>MonoBehaviour<\/code>-\u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043b\u0438\u0448\u044c \u0434\u0432\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044f: \u043e\u0434\u043d\u043e c \u0442\u0438\u043f\u043e\u043c <code>Transform<\/code>, \u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 <code>MonoBehaviour<\/code>. \u041e\u0441\u0442\u0430\u0432\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435 \u043f\u0443\u0441\u0442\u044b\u043c\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u043d\u0438 \u043e\u0431\u0430 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 null:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/373\/657\/7fc\/3736577fcecceaa79706220e5e5f6e7f.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/373\/657\/7fc\/3736577fcecceaa79706220e5e5f6e7f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/373\/657\/7fc\/3736577fcecceaa79706220e5e5f6e7f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c <code>Transform<\/code> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0438\u0448\u044c &#171;\u043f\u0440\u0438\u0442\u0432\u043e\u0440\u044f\u0435\u0442\u0441\u044f&#187; null-\u043e\u043c, \u043d\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 null, \u043a\u0430\u043a <code>?.<\/code>, <code>??<\/code>, <code>??=<\/code>, <code>is null<\/code> \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0432\u0435\u0434\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u043f\u043e\u043b\u0435 <code>KeyboardTracker.ActiveKeyboardTransform<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>?.<\/code>, \u043d\u043e \u0438\u0437-\u0437\u0430 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u044f\u0432\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 &#171;\u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u0438&#187; \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430. \u0412 \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 null \u0432\u0441\u0451 \u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>==<\/code>, <code>!=<\/code> \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <code>field<\/code>, <code>!field<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435. \u041e\u0431\u0430 \u044d\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0438\u043c\u0435\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0435\u044f\u0432\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041f\u0443\u0442\u0430\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 || \u0438 &amp;&amp; \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h3>\n<pre><code class=\"cs\">public static bool SaveCubemapCapture(....) {   ....   if (    dirName[dirName.Length - 1] != '\/'         || dirName[dirName.Length - 1] != '\\\\')   {     dirName += \"\/\";   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3022\/\" rel=\"noopener noreferrer nofollow\">V3022<\/a> [CWE-571] Expression is always true. Probably the &#8216;&amp;&amp;&#8217; operator should be used here. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/VR\/Scripts\/Util\/OVRCubemapCapture.cs#L201\" rel=\"noopener noreferrer nofollow\">OVRCubemapCapture.cs 201<\/a>.<\/p>\n<p>\u041e\u0442\u0432\u043b\u0435\u0447\u0451\u043c\u0441\u044f \u043e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u043e <code>true<\/code>, \u0432\u0435\u0434\u044c \u0432 \u043d\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>||<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <code>dirName[dirName.Length - 1]<\/code> \u0434\u0432\u0443\u043c \u0440\u0430\u0437\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e, \u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u2014 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u0443\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>||<\/code> \u043d\u0430 <code>&amp;&amp;<\/code>.<\/p>\n<h3>\u041d\u0435\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0451\u043d\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430<\/h3>\n<pre><code class=\"cs\">private SceneInfo GetSceneInfo() {   SceneInfo sceneInfo = new SceneInfo();   try   {     var reader = new StreamReader(sceneLoadDataPath); \/\/ &lt;=     ....     while (!reader.EndOfStream)     {       sceneList.Add(reader.ReadLine());     }     sceneInfo.scenes = sceneList;   }   .... <\/code><\/pre>\n<p>}<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3114\/\" rel=\"noopener noreferrer nofollow\">V3114<\/a> [CWE-404] IDisposable object &#8216;reader&#8217; is not disposed before method returns. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/VR\/Scripts\/OVRSceneLoader.cs#L212\" rel=\"noopener noreferrer nofollow\">OVRSceneLoader.cs 212<\/a><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0443\u0442\u0435\u0447\u043a\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 <code>StreamReader<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 (\u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f GC) \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0430\u043c\u044f\u0442\u044c, \u0432\u044b\u0437\u0432\u0430\u0432 \u043c\u0435\u0442\u043e\u0434 <code>Dispose()<\/code>.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 <code>using<\/code>, \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <code>Dispose<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043d\u0435\u044f\u0432\u043d\u043e.  \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">private SceneInfo GetSceneInfo() {   SceneInfo sceneInfo = new SceneInfo();   try   {     using (var reader = new StreamReader(sceneLoadDataPath))     {       ....       while (!reader.EndOfStream)       {         sceneList.Add(reader.ReadLine());       }       sceneInfo.scenes = sceneList;      }   }   .... <\/code><\/pre>\n<p>}<\/p>\n<h3>\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h3>\n<p><strong>Issue 1<\/strong><\/p>\n<pre><code class=\"cs\">private static bool RenameSpatializerPluginToOld(string currentPluginPath) {   ....   targetPluginPath = currentPluginPath + \".old\" + index.ToString();   targetPluginMetaPath = targetPluginPath + \".meta\";    if (!File.Exists(targetPluginPath) &amp;&amp; !File.Exists(targetPluginPath))     break;   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3001\/\" rel=\"noopener noreferrer nofollow\">V3001<\/a> There are identical sub-expressions &#8216;!File.Exists(targetPluginPath)&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/Spatializer\/editor\/ONSPAudioPluginUpdater.cs#L138\" rel=\"noopener noreferrer nofollow\">ONSPAudioPluginUpdater.cs 138<\/a>.<\/p>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u043f\u043e \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0443\u0442\u0438 \u0438\u0437 <code>targetPluginPath<\/code>. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 <code>targetPluginMetaPath<\/code>, \u043d\u0430\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0434\u043b\u044f \u043d\u0435\u0451.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439.<\/p>\n<p><strong>Issue 2<\/strong><\/p>\n<pre><code class=\"cs\">protected void UpdateActive(OvrAvatar avatar, ovrAvatarVisibilityFlags mask) {   ....   bool showFirstPerson = (mask &amp; ovrAvatarVisibilityFlags.FirstPerson) != 0;   bool showThirdPerson = (mask &amp; ovrAvatarVisibilityFlags.ThirdPerson) != 0;    gameObject.SetActive(showThirdPerson || showThirdPerson);   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3001\/\" rel=\"noopener noreferrer nofollow\">V3001<\/a> There are identical sub-expressions &#8216;showThirdPerson&#8217; to the left and to the right of the &#8216;||&#8217; operator. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/Avatar\/Scripts\/OvrAvatarRenderComponent.cs#L21\" rel=\"noopener noreferrer nofollow\">OvrAvatarRenderComponent.cs 21<\/a>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434 <code>gameObject.SetActive<\/code>. \u041e\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>||<\/code>, \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>showThirdPerson<\/code>. \u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u043a \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>showFirstPerson<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432.<\/p>\n<h3>\u0426\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0446\u0438\u043a\u043b<\/h3>\n<pre><code class=\"cs\">protected override void DoSelectUpdate(....) {   ....   while (!outsideDelta)   {     ....     if (....)     {       outsideDelta = true;       break;     }      if (....)     {       outsideDelta = true;       break; \/\/ &lt;=     }      break; \/\/ &lt;=   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3020\/\" rel=\"noopener noreferrer nofollow\">V3020<\/a> [CWE-670] An unconditional &#8216;break&#8217; within a loop. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/Interaction\/Runtime\/Scripts\/Interaction\/Models\/Poke\/PokeInteractor.cs#L300\" rel=\"noopener noreferrer nofollow\">PokeInteractor.cs 300<\/a>.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0434\u0435\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c. \u0421\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u0432\u0440\u0435\u0434\u043d\u044b, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<\/p>\n<p>\u0422\u0430\u043a, \u0432 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0446\u0438\u043a\u043b \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <code>continue<\/code> \u0438 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c <code>break<\/code> \u0432 \u043a\u043e\u043d\u0446\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u043c. \u0421\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435\u043c \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u0446\u0438\u043a\u043b\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f.<\/p>\n<h4>\u041e\u0431\u0437\u043e\u0440 \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439<\/h4>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u043c\u043e\u0449\u0438 \u0432 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043e\u0448\u0438\u0431\u043e\u043a, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0442\u0430\u043a\u0438\u0435 \u043a\u0435\u0439\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u043c\u0438, \u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u0434\u0440\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.<\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u043d\u0435 \u043e\u0434\u0438\u043d-\u0434\u0432\u0430, \u0430 \u043e\u0434\u0438\u043d-\u0434\u0432\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0430? \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0443\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 &#171;\u0441\u044a\u0435\u0434\u0430\u0442\u044c&#187; \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u043b\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c\u0443 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 RocketMan \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e, \u0432\u0441\u0435\u0433\u043e 25. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<h3>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u0434\u0440\u0430<\/h3>\n<pre><code class=\"cs\">void Update() {   ....   FindHoverObject(controllerPos, controllerRot);   .... }  void FindHoverObject(Vector3 controllerPos, Quaternion controllerRot) {   var objectsHit = Physics.RaycastAll(controllerPos,                                        controllerRot * Vector3.forward);   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v4008\/\" rel=\"noopener noreferrer nofollow\">V4008<\/a> Unity Engine. Avoid using the &#8216;Physics.RaycastAll&#8217; memory allocation method in performance-sensitive context inside &#8216;FindHoverObject&#8217;. Consider using the &#8216;RaycastNonAlloc&#8217; non-allocation method instead. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/SampleFramework\/Usage\/Passthrough\/Scripts\/ObjectManipulator.cs#L55\" rel=\"noopener noreferrer nofollow\">ObjectManipulator.cs 55<\/a>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>Physics.RaycastAll<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430. \u041d\u043e \u0447\u0442\u043e \u0436\u0435 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 <code>Physics.RaycastAll<\/code> (\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443) \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0447\u0430\u0449\u0435\u043d\u0438\u044e \u0432\u044b\u0437\u043e\u0432\u0430 GC, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443 <code>Physics.RaycastAll<\/code> \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 <code>Physics.RaycastNonAlloc<\/code>. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>Physics.RaycastNonAlloc<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0444\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0421\u0430\u043c \u0431\u0443\u0444\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043f\u043e\u043b\u0435, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044f \u0438 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<h3>\u0412\u044b\u0437\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438<\/h3>\n<pre><code class=\"cs\">void Update() {   ....   if (grabObject)   {     ....     ManipulateObject(grabObject,     controllerPos,     controllerRot);     ....   }   .... } void ManipulateObject(....) {   ....   if (obj.GetComponent&lt;GrabObject&gt;()) \/\/ &lt;=   {      ....      switch (obj.GetComponent&lt;GrabObject&gt;() \/\/ &lt;=     .objectManipulationType)      ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v4005\/\" rel=\"noopener noreferrer nofollow\">V4005<\/a> Expensive operation is performed inside the &#8216;GetComponent&#8217; method. Calling such method in performance-sensitive context located inside the &#8216;ManipulateObject&#8217; method can lead to decreased performance. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/SampleFramework\/Usage\/Passthrough\/Scripts\/ObjectManipulator.cs#L71\" rel=\"noopener noreferrer nofollow\">ObjectManipulator.cs 71<\/a>.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b <code>obj.GetComponent&lt;GrabObject&gt;()<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <code>Update<\/code>. <code>GetComponent<\/code> \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u0430\u043a <code>Update<\/code>.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c, \u0432\u0435\u0434\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>GetComponent<\/code>, \u043c\u043e\u0436\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 \u0432 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u043a\u0430\u043a <code>Start<\/code> \u0438 <code>Awake<\/code>. \u0410 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>Behaviour.enabled<\/code>.<\/p>\n<h3>\u041d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/h3>\n<pre><code class=\"cs\">private void Update() {   ....   if (referenceHand)   {     ....                 CreateHandMesh(); \/\/ &lt;=   }   .... }  void CreateHandMesh() {   ....   for (int i = 0; i &lt; 5; i++)   {     ....     AddKnuckleMesh(....); \/\/ &lt;=     AddKnuckleMesh(....); \/\/ &lt;=     ....     AddKnuckleMesh(....); \/\/ &lt;=   }   .... }  void AddKnuckleMesh(....) {   ....   Vector3 windingVec = rightVec;    for (int i = 0; i &lt; fanVerts * 2; i++)   {     ....     Vector3 vertPos = handVertices[basePoint] +                        windingVec *       \/\/ &lt;=                       borderSize *                        handScale *                        (....);     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v4006\/\" rel=\"noopener noreferrer nofollow\">V4006<\/a> Unity Engine. Multiple operations between the &#8216;windingVec&#8217; complex value and numeric values. Prioritizing operations between numeric values can optimize execution time. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/SampleFramework\/Usage\/Passthrough\/Scripts\/HandMeshMask.cs#L70\" rel=\"noopener noreferrer nofollow\">HandMeshMask.cs 70<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>vertPos<\/code> \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>AddKnuckleMesh<\/code>. \u041e\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0434\u0438\u043d \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u2014 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u043e\u043c \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0427\u0442\u043e \u0436\u0435 \u0432 \u043d\u0451\u043c \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>windingVec<\/code> \u2014 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>Vector3<\/code>. \u041f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0435\u0433\u043e \u0442\u0440\u0451\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0434\u0435\u0432\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u042d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0430 \u0443\u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0443\u0436\u0435 \u0448\u0435\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0430 \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">windingVec * (borderSize * handScale * (....)) <\/code><\/pre>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u044d\u0442\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u0435\u0437 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u044f\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 (9 * 5 = 45);<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u0442\u043e\u0434 <code>AddKnuckleMesh<\/code> \u0442\u0440\u0438\u0436\u0434\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 \u0441 \u043f\u044f\u0442\u044c\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>CreateHandMesh<\/code> (45 * 3 * 5 = 675);<\/p>\n<\/li>\n<li>\n<p>\u043c\u0435\u0442\u043e\u0434 <code>CreateHandMesh<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>Update<\/code>, \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043a\u0430\u0434\u0440\u043e\u0432. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 100 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (675 * 100 = 67500);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u0436\u0435 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 <code>CreateHandMesh<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c. \u041d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 (67500 \/ 2 = 33750).<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0443\u0441\u0442\u044c \u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0435, \u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f (33750), \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (33750 \/ 9 * 6 = 22500). \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 11250 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u041d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 VR-\u0438\u0433\u0440\u044b RocketMan \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Unity. \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, RocketMan \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u0436\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u0434\u043e\u0432\u044b\u0445 \u0431\u0430\u0437\u0430\u0445.<\/p>\n<p>\u0412 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043d\u0430 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0435 \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u0434\u0430 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e &#171;\u0443\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445&#187; \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u044b \u0443\u0436\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0437\u0434\u043d\u043e \u0441\u0430\u043c\u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c PVS-Studio \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445: \u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434, \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1278\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6607\/\" rel=\"noopener noreferrer nofollow\">\u0433\u0430\u0439\u0434\u043e\u043c<\/a> \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>\u0414\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Andrey Moskalev. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/csharp\/1278\/\" rel=\"noopener noreferrer nofollow\">Digging into open-source Unity VR Games. Part 1: RocketMan<\/a>.<\/p>\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\/939886\/\"> https:\/\/habr.com\/ru\/articles\/939886\/<\/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>\u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0443 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438 VR-\u0438\u0433\u0440\u0430\u043c\u0438, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio. \u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c, RocketMan!<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u041e \u0438\u0433\u0440\u0435<\/h3>\n<p><a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\" rel=\"noopener noreferrer nofollow\">RocketMan<\/a> \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0433\u0440\u0430-\u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430. \u041f\u043e \u043b\u043e\u0440\u0443 \u0432\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441\u0431\u0435\u0436\u0430\u0442\u044c \u0441 \u043f\u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u043d\u0435\u0442\u044b \u043d\u0430 \u043a\u043e\u0441\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u043a\u0435\u0442\u0435, \u043d\u043e \u0432\u0441\u0451 \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a: \u0440\u0430\u043a\u0435\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u044b\u0448\u043b\u0438 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f, \u0432\u0441\u0435 \u043e\u0442\u0441\u0435\u043a\u0438 \u0437\u0430\u043f\u0435\u0440\u0442\u044b, \u0430 \u0432\u044b \u0437\u0430\u0441\u0442\u0440\u044f\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043b\u043e\u0432\u0443\u0448\u043a\u0438, \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0434\u0438\u043d \u043e\u0442\u0441\u0435\u043a \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u0440\u0430\u043a\u0435\u0442\u0443 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0443\u043b\u0435\u0442\u0435\u0442\u044c!<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0418\u043c\u0435\u044f \u0432 \u0441\u0432\u043e\u0451\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 VR-\u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443, \u044f \u0441\u0430\u043c \u0441\u044b\u0433\u0440\u0430\u043b \u0432 \u0438\u0433\u0440\u0443 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043c\u043e\u0446\u0438\u0438, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443, \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0438 \u043e\u0434\u043d\u0443 \u0432\u043d\u0435\u043f\u043b\u0430\u043d\u043e\u0432\u0443\u044e \u044d\u0432\u0430\u043a\u0443\u0430\u0446\u0438\u044e \u0438\u0437 \u0440\u0430\u043a\u0435\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \ud83d\ude42<\/p>\n<p>\u041f\u043e \u0433\u0435\u0439\u043c\u043f\u043b\u0435\u044e \u0432 \u0438\u0433\u0440\u0435, \u043a\u0430\u043a \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0434\u043e \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430 \u043d\u0430 \u043f\u043b\u0430\u043d\u0435\u0442\u0435, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u0431\u0435\u0436\u0430\u0442\u044c. \u0415\u0449\u0451 \u043a\u0440\u0443\u0447\u0435 \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043a \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0433\u043d\u0435\u0442\u0430\u044e\u0449\u0438\u0435 \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439, \u0443\u0447\u0430\u0449\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u043d\u0446\u0443. \u0410 \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0431\u044b \u0432\u044b? \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0438\u0433\u0440\u043e\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0432 \u0435\u0451 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio? \u041d\u043e \u043f\u043e\u0433\u043e\u0434\u0438\u0442\u0435, \u0430 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 PVS-Studio?<\/p>\n<h3>O PVS-Studio<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u0441\u043b\u044b\u0448\u0438\u0442\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435, PVS-Studio \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 C#, Java, C \u0438\u043b\u0438 \u0421++ \u0431\u0435\u0437 \u0435\u0433\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u044f \u0433\u043e\u0432\u043e\u0440\u044e &#171;\u043a\u043e\u0434&#187;, \u0442\u043e \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u0438 \u0446\u0435\u043b\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u2014 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 PVS-Studio \u0443\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0435 \u043a\u043e\u0434\u0430 Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 API \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d UnityEngine, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 API. \u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u0432\u044b\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 \u0442\u0430\u043a\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u0430\u043a <code>Update<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0447\u0451\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e\/\u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e Unity-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441 <code>null<\/code>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0438\u0433\u0440\u0435, \u0447\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c null-\u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u043e\u0431 \u044d\u0442\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/0744\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0441\u0442\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 Unity<\/a>;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/csharp\/1236\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Unity: \u043d\u043e\u0432\u044b\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 IDE (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e Visual Studio);<\/p>\n<\/li>\n<li>\n<p>\u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435 IDE \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437;<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><\/figure>\n<ul>\n<li>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><\/figure>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u043e\u0433\u043e <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/0032\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a> \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6607\/?ysclid=md8hmmtsug555878439\" rel=\"noopener noreferrer nofollow\">\u0441\u0430\u0439\u0442\u0435<\/a>. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043e\u0431\u0437\u043e\u0440\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u0438\u0433\u0440\u044b.<\/p>\n<h3>\u041e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435<\/h3>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0433\u0440\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0430 \u043c\u043e\u0436\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0438\u0448\u0443\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u043e\u0434, \u043d\u043e \u044f\u0432\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u0434\u0435 \u0438\u0433\u0440\u044b \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041a\u0440\u043e\u043c\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0442\u043e\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f.<\/p>\n<p>\u041a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u0438\u0432\u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b Oculus, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f VR-\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0438\u0445, \u0445\u043e\u0442\u044c \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0438\u0433\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0435 VR-API. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043e\u0434 \u043d\u0430\u043c \u0441 \u0432\u0430\u043c\u0438 \u043d\u0435 \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043a\u0438\u043b\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0438 \u043d\u0435 \u043f\u043e\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \ud83d\ude42<\/p>\n<h4>\u041e\u0431\u0437\u043e\u0440 \u043e\u0448\u0438\u0431\u043e\u043a<\/h4>\n<h3>\u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440<\/h3>\n<pre><code class=\"cs\">public void InsertChar(string c)  {   ....   waiter(); \/\/avoid double button clicks } IEnumerator waiter() {   yield return new WaitForSecondsRealtime(2); } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3206\/\" rel=\"noopener noreferrer nofollow\">V3206<\/a> Unity Engine. A direct call to the &#8216;waiter&#8217; coroutine-like method will not start it. Use the &#8216;StartCoroutine&#8217; method instead. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Scripts\/Tutorial\/Keyboard_Tuto.cs#L26\" rel=\"noopener noreferrer nofollow\">Keyboard_Tuto.cs 26<\/a>.<\/p>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>InsertChar<\/code> \u0435\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 &#8216;waiter&#8217;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0432\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u041d\u0430 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>waiter<\/code> \u2014 <code>new WaitForSecondsRealtime(2)<\/code>.<\/p>\n<p>\u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0436\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d \u043e\u0431\u044a\u0435\u043a\u0442-\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u0442\u0435\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u0441\u0435 \u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>waiter().MoveNext()<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 <code>new WaitForSecondsRealtime(2)<\/code> \u043d\u0435 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440-\u0442\u0430\u0439\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0443 \u043d\u0435\u0433\u043e &#8216;MoveNext&#8217; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435, \u043f\u0440\u043e\u0448\u0451\u043b \u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0440\u0435\u0437\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>InsertChar<\/code> \u0438\u0437-\u0437\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">bool _disableInsertChar = false; public void InsertChar(string c)  {   if (_disableInsertChar)     return;   ....   StartCoroutine(waiter());  } IEnumerator waiter() {   _disableInsertChar = true;   yield return new WaitForSecondsRealtime(2);   _disableInsertChar = false; } <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u0430\u043a \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430 Unity, \u0442.\u043a. \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u0438\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u0435\u0442\u043e\u0434\u0443 <code>StartCoroutine<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <code>waiter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>new WaitForSecondsRealtime(2)<\/code> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0430 \u0434\u0432\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (\u0442.\u043a. \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430\u0445).<\/p>\n<p>\u041d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 <code>_disableInsertChar<\/code> \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0432 <code>true<\/code> \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u0438 \u0432 <code>false<\/code> \u2014 \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u0434\u0432\u0443\u0445 \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b. \u0412 \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>InsertChar<\/code> \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 <code>_disableInsertChar<\/code> \u0440\u0430\u0432\u0435\u043d <code>true<\/code>.<\/p>\n<h3>\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 null \u0432\u0432\u0438\u0434\u0443 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044f<\/h3>\n<pre><code class=\"cs\">public class OVRTrackedKeyboard : MonoBehaviour {   ....   public Transform ActiveKeyboardTransform;   .... }  public class OVRTrackedKeyboardHands : MonoBehaviour {   ....   private void LateUpdate()   {     ....     var position = KeyboardTracker.ActiveKeyboardTransform?.position;     var rotation = KeyboardTracker.ActiveKeyboardTransform?.rotation;     ....   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3216\/\" rel=\"noopener noreferrer nofollow\">V3216<\/a> [CWE-754] Unity Engine. Checking the &#8216;ActiveKeyboardTransform&#8217; field with a specific Unity Engine type for null with &#8216;?.&#8217; may not work correctly due to implicit field initialization by the engine. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/VR\/Scripts\/OVRTrackedKeyboard\/OVRTrackedKeyboardHands.cs#L296\" rel=\"noopener noreferrer nofollow\">OVRTrackedKeyboardHands.cs 296<\/a>.<\/p>\n<p>\u042d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u043c, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0435: \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c-\u043f\u0443\u0441\u0442\u044b\u0448\u043a\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0441 \u0442\u0438\u043f\u043e\u043c <code>UnityEngine.Object<\/code> \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u043c \u043e\u0442 \u043d\u0435\u0433\u043e (\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <code>MonoBehaviour<\/code>, <code>ScriptableObject<\/code>).<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043b\u0430\u0434\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c <code>MonoBehaviour<\/code>-\u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043b\u0438\u0448\u044c \u0434\u0432\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044f: \u043e\u0434\u043d\u043e c \u0442\u0438\u043f\u043e\u043c <code>Transform<\/code>, \u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 <code>MonoBehaviour<\/code>. \u041e\u0441\u0442\u0430\u0432\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435 \u043f\u0443\u0441\u0442\u044b\u043c\u0438, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043e\u043d\u0438 \u043e\u0431\u0430 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 null:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c <code>Transform<\/code> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0438\u0448\u044c &#171;\u043f\u0440\u0438\u0442\u0432\u043e\u0440\u044f\u0435\u0442\u0441\u044f&#187; null-\u043e\u043c, \u043d\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 null, \u043a\u0430\u043a <code>?.<\/code>, <code>??<\/code>, <code>??=<\/code>, <code>is null<\/code> \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0432\u0435\u0434\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439: \u043f\u043e\u043b\u0435 <code>KeyboardTracker.ActiveKeyboardTransform<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>?.<\/code>, \u043d\u043e \u0438\u0437-\u0437\u0430 \u043d\u0435\u044f\u0432\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u044f\u0432\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 &#171;\u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u0438&#187; \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430. \u0412 \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 null \u0432\u0441\u0451 \u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <code>==<\/code>, <code>!=<\/code> \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <code>field<\/code>, <code>!field<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435. \u041e\u0431\u0430 \u044d\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0438\u043c\u0435\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0435\u044f\u0432\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041f\u0443\u0442\u0430\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 || \u0438 &amp;&amp; \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h3>\n<pre><code class=\"cs\">public static bool SaveCubemapCapture(....) {   ....   if (    dirName[dirName.Length - 1] != '\/'         || dirName[dirName.Length - 1] != '\\\\')   {     dirName += \"\/\";   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v3022\/\" rel=\"noopener noreferrer nofollow\">V3022<\/a> [CWE-571] Expression is always true. Probably the &#8216;&amp;&amp;&#8217; operator should be used here. <a href=\"https:\/\/github.com\/EliaFantini\/RocketMan-a-VR-videogame-created-with-Unity\/blob\/12daf818cc1994b240e5d78e65f633b6e300dfcc\/CS-440\/Assets\/Oculus\/VR\/Scripts\/Util\/OVRCubemapCapture.cs#L201\" rel=\"noopener noreferrer nofollow\">OVRCubemapCapture.cs 201<\/a>.<\/p>\n<p>\u041e\u0442\u0432\u043b\u0435\u0447\u0451\u043c\u0441\u044f \u043e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f Unity-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u043e <code>true<\/code>, \u0432\u0435\u0434\u044c \u0432 \u043d\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>||<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <code>dirName[dirName.Length - 1]<\/code> \u0434\u0432\u0443\u043c \u0440\u0430\u0437\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u043e, \u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u2014 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043f\u0443\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>||<\/code> \u043d\u0430 <code>&amp;&amp;<\/code>.<\/p>\n<h3>\u041d\u0435\u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0451\u043d\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430<\/h3>\n<pre><code class=\"cs\">private SceneInfo GetSceneInfo() {   SceneInfo sceneInfo = new SceneInfo();   try   {     var reader = new StreamReader(sceneLoadDataPath); \/\/ &lt;=     ....     while (!reader.EndOfStream)     {<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-471660","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471660","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=471660"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471660\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}