{"id":341278,"date":"2022-11-15T15:00:26","date_gmt":"2022-11-15T15:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=341278"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=341278","title":{"rendered":"<span>\u0414\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0443\u0442\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Animation Curve<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0448\u0430 \u0414\u044f\u0434\u0438\u0447\u0435\u043d\u043a\u043e, \u0438 \u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043f\u043e\u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 2\u0434 \u043a\u0440\u0438\u0432\u044b\u0445. \u0422\u0430\u043a \u0436\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c Unity Animation Curve. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c1c\/328\/345\/c1c328345650a5b21651905faf8df9f0.jpg\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1c\/328\/345\/c1c328345650a5b21651905faf8df9f0.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u0441\u0435\u0440\u0434\u0435\u0447\u043d\u0430. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0443\u044e \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c. \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0442.\u043f. \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043a\u0440\u0438\u0432\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442. \u0421\u0438\u043d\u0443\u0441\u044b, \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u044b, \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c <a href=\"https:\/\/www.desmos.com\/calculator?lang=ru\" rel=\"noopener noreferrer nofollow\">desmos<\/a>, \u0442\u0430\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043e\u0431\u0440\u0430\u0432 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430<a href=\"https:\/\/habr.com\/ru\/post\/435828\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043a\u0440\u0438\u0432\u044b\u0435<\/a> \u0438 \u0442\u0430\u043c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u043b\u044c\u0444\u0440\u0430\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. \u041d\u043e \u0435\u0441\u0442\u044c \u043f\u0443\u0442\u044c \u043f\u0440\u043e\u0449\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0432\u044b\u0445. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Unity Animation Curve. \u0422\u0430\u043a \u0432\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<h2>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 \u0444\u043e\u043d\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 depth texture arkit \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637384300ca3379afa739df6\" data-style=\"\" id=\"637384300ca3379afa739df6\" width=\"\"><\/div>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/63738512c2b79400c82d4323\" data-style=\"\" id=\"63738512c2b79400c82d4323\" width=\"\"><\/div>\n<p>\u0422\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0435\u0435 \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u044c\u0444\u0443 \u0447\u0435\u0440\u0435\u0437 \u043a\u0440\u0438\u0432\u0443\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u0443\u044e \u043e\u0431\u0442\u0440\u0430\u0432\u043a\u0443. \u041f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0440\u0438\u0432\u0443\u044e \u0432 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0443 \u043a\u0440\u0438\u0432\u0443\u044e, \u043d\u043e \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043a\u0440\u0438\u0432\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Unity Animation Curve \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0438 \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0430\u043b\u044c\u0444\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637384fb8f11379b280abd88\" data-style=\"\" id=\"637384fb8f11379b280abd88\" width=\"\"><\/div>\n<p>\u041d\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u0440\u0438\u0432\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0436\u0435 \u0430\u043b\u044c\u0444\u044b \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><span><\/span><\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u0430. \u0427\u0442\u043e\u0436, \u0437\u0430\u0447\u0435\u043c \u0432\u0440\u043e\u0434\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438. \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/81a\/493\/4c7\/81a4934c7d2b43d5ec566697bb571256.png\" width=\"2555\" height=\"1353\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81a\/493\/4c7\/81a4934c7d2b43d5ec566697bb571256.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0432 Unity \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041a\u043b\u0430\u0441\u0441 <em>Texture2D<\/em> \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0438 \u043d\u0435 \u0442\u0430\u043a \u0434\u043e\u0440\u043e\u0433\u043e \u043f\u043e \u043f\u0435\u0440\u0444\u043e\u043c\u0430\u043d\u0441\u0443, \u0445\u043e\u0442\u044f \u043f\u0435\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u044f \u0431\u044b \u043d\u0435 \u0441\u0442\u0430\u043b. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>OnEnable<\/em> \u0441\u0430\u043c\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0441\u0446\u0435\u043d\u044b \u0438\u043b\u0438 \u0438\u0433\u0440\u044b \u043c\u044b \u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0432 1px. \u0418 \u0442\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 <em>TextureWrapMode<\/em>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043a\u0440\u0438\u0432\u044b\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. \u0410 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0444\u0444\u0435\u043a\u0442 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043a\u0430\u0436\u0435\u043c UV \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0435\u0448\u0430, \u0442\u043e:<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Clamp<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a0e\/d64\/38f\/a0ed6438f8e0302aa0867f89eb0f09de.png\" width=\"2558\" height=\"1382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a0e\/d64\/38f\/a0ed6438f8e0302aa0867f89eb0f09de.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 UV \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u043d\u0430\u0448\u0435\u0439 \u043a\u0440\u0438\u0432\u043e\u0439. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0432\u0435\u0437\u0434\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0430\u0439\u043b\u0438\u043d\u0433 2 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0438\u0437 \u0442\u0440\u0451\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0446\u0432\u0435\u0442\u0430 \u0432 \u043a\u0440\u0438\u0432\u044b\u0445.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Repeat<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/091\/f8f\/ad3\/091f8fad354b70a9cee80ea47ad0c3b9.png\" width=\"2557\" height=\"1380\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/091\/f8f\/ad3\/091f8fad354b70a9cee80ea47ad0c3b9.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 UV. \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Mirror<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb1\/513\/9de\/cb15139dec37add073d5f3e4157853b4.png\" width=\"2558\" height=\"1380\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb1\/513\/9de\/cb15139dec37add073d5f3e4157853b4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 Repeat, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0445\u043e\u0434\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 UV \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0440\u0438\u0432\u0443\u044e. \u0423\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f &#171;\u043f\u0438\u043d\u043f\u043e\u043d\u0433&#187; \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Mirror Once<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/656\/5b8\/98f\/6565b898feb390185f6bca0b0d7212a3.png\" width=\"2561\" height=\"1381\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/656\/5b8\/98f\/6565b898feb390185f6bca0b0d7212a3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0440\u0438\u0432\u0443\u044e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a Clamp. <strong>\u0412\u0430\u0436\u043d\u043e: <\/strong>\u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 uv (-1, 1), \u0430 \u043d\u0435 (0,2). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b offset, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p><strong>\u0411\u0435\u0437\u043e\u0442\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0432 \u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<pre><code class=\"cs\">using UnityEngine; namespace Nox7atra {     public class AnimCurveToTex : MonoBehaviour     {         [SerializeField] private AnimationCurve _animationCurveR;         [SerializeField] private AnimationCurve _animationCurveG;         [SerializeField] private AnimationCurve _animationCurveB;         [SerializeField] private AnimationCurve _animationCurveA;         [SerializeField] private TextureWrapMode _wrapMode = TextureWrapMode.Clamp;         [SerializeField] private TextureFormat _textureFormat = TextureFormat.RGBA32;         [SerializeField] private FilterMode _filterMode = FilterMode.Point;         [Range(2, 256)]         [SerializeField] private int _textureResoluton = 128;         [SerializeField] private Material _targetMaterial;         [HideInInspector]         [SerializeField] private string _texturePropertyName;                  private Texture2D _texture;         private void OnValidate()         {             UpdateCurveTex();         }          private void OnEnable()         {             UpdateCurveTex();         }              private void UpdateCurveTex()         {             if(_targetMaterial == null) return;             _texture = new Texture2D(_textureResoluton, 1, _textureFormat, false)             {                 wrapMode = _wrapMode,                 filterMode = _filterMode,             };             for (int i = 0; i &lt; _texture.width; i++)             {                 var phase = (float) i \/ (_texture.width - 1);                 _texture.SetPixel(i, 0, new Color(                     _animationCurveR.Evaluate(phase),                      _animationCurveG.Evaluate(phase),                     _animationCurveB.Evaluate(phase),                     _animationCurveA.Evaluate(phase)                     ));             }             _texture.Apply();             _targetMaterial.SetTexture(_texturePropertyName, _texture);         }                  private void OnDestroy()         {             Destroy(_texture);         }     } }<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0435\u0449\u0451 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u044d\u0442\u043e \u043d\u0430 <em>TextureFormat<\/em>. \u0427\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0448\u0438\u043d\u0443 \u0433\u043f\u0443, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0432\u0440\u043e\u0434\u0435 R8 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043a\u0430\u043d\u0430\u043b. \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0432\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>UpdateCurveTex <\/em>\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 <em>_textureResoluton <\/em>\u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0432 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0438 \u0431\u0435\u0437 mipmap (\u0432\u0440\u044f\u0434 \u043b\u0438 \u043e\u043d\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f). \u0414\u0430\u043b\u044c\u0448\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0431\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u0440\u0438\u0432\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u044d\u0442\u0443 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u043b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 <em>_texturePropertyName<\/em> \u0441\u043a\u0440\u044b\u0442 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435, \u0442\u043e \u043a\u0430\u043a \u043e\u043d \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f?<\/p>\n<h2>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438<\/h2>\n<p>\u041f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0443\u0436\u043d\u043e\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0432 <em>_texturePropertyName <\/em>\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440. \u041e\u043d \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<pre><code class=\"cs\">using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.Rendering;  namespace Nox7atra {     [CustomEditor(typeof(AnimCurveToTex))]     public class AnimCurveToTex_Editor : Editor     {         private AnimCurveToTex _target;         private SerializedProperty _material;         private SerializedProperty _texturePropertyName;                  public void OnEnable()         {             _material = serializedObject.FindProperty(\"_targetMaterial\");             _texturePropertyName = serializedObject.FindProperty(\"_texturePropertyName\");         }          public override void OnInspectorGUI()         {             base.OnInspectorGUI();             var matNames = GetMaterialPropertyNames();             if (matNames != null)             {                 var index = matNames.IndexOf(_texturePropertyName.stringValue);                 if (index &lt; 0)                 {                     index = 0;                 }                 _texturePropertyName.stringValue = matNames[EditorGUILayout.Popup(index, matNames.ToArray())];                 _texturePropertyName.serializedObject.ApplyModifiedProperties();             }         }          public List&lt;string> GetMaterialPropertyNames()         {             var shader = (_material.objectReferenceValue as Material)?.shader;             if (shader == null)                 return null;             var count = shader.GetPropertyCount();             List&lt;string> materialPropertyNames = new List&lt;string>();              for (int i = 0; i &lt; count; i++)             {                 if (shader.GetPropertyType(i) == ShaderPropertyType.Texture)                 {                     var property = shader.GetPropertyName(i);                     if (!materialPropertyNames.Contains(property))                     {                         materialPropertyNames.Add(property);                     }                 }             }             return materialPropertyNames;         }     } }<\/code><\/pre>\n<p><em>SerializedProperty <\/em>\u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0443\u0436\u043d\u044b\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u044f \u043b\u0438\u0448\u043d\u0438\u0445 public \u043f\u043e\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0432 \u0431\u0438\u043b\u0434\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u044b \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0432 \u043d\u0430\u0448 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <em>GetMaterialPropertyNames. <\/em>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u043d\u0430\u0448 \u0448\u0435\u0439\u0434\u0435\u0440 \u0438 \u0438\u0449\u0435\u0442 \u0442\u0430\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0442\u0438\u043f\u0430 <em>ShaderPropertyType.Texture<\/em>. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435. <strong>\u0412\u0430\u0436\u043d\u043e: <\/strong>\u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <em>SerializedProperty <\/em>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>serializedObject.ApplyModifiedProperties().<\/em><\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0432 \u0448\u0435\u0439\u0434\u0435\u0440.<\/p>\n<h2>\u0418 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637393d13bf07c9b40049ab9\" data-style=\"\" id=\"637393d13bf07c9b40049ab9\" width=\"\"><\/div>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/strong><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/82f\/a4b\/30d\/82fa4b30d05d26a9f54917f3e722c556.png\" width=\"2561\" height=\"1381\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/82f\/a4b\/30d\/82fa4b30d05d26a9f54917f3e722c556.png\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>\u0428\u0435\u0439\u0434\u0435\u0440<\/strong><\/p>\n<pre><code class=\"cpp\">Shader \"Unlit\/HologramShader\" {     Properties     {         _MainTex (\"Texture\", 2D) = \"white\" {}         _MaskTex (\"MaskTex\", 2D) = \"white\" {}         _Speed(\"Speed\", float) = 1     }     SubShader     {         Tags {\"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\"}         LOD 100          ZWrite Off         Blend SrcAlpha OneMinusSrcAlpha           Pass         {             CGPROGRAM             #pragma vertex vert             #pragma fragment frag             #include \"UnityCG.cginc\"              struct appdata             {                 float4 vertex : POSITION;                 float2 uv : TEXCOORD0;                 float2 uv2 : TEXCOORD1;             };              struct v2f             {                 float2 uv : TEXCOORD0;                 float2 uv2 : TEXCOORD1;                 float4 vertex : SV_POSITION;             };              sampler2D _MainTex;             sampler2D _MaskTex;             float4 _MainTex_ST;             float4 _MaskTex_ST;             float _Speed;              v2f vert (appdata v)             {                 v2f o;                 o.vertex = UnityObjectToClipPos(v.vertex);                 o.uv = TRANSFORM_TEX(v.uv, _MainTex);                 o.uv2 = TRANSFORM_TEX(v.uv2, _MaskTex);                 float x = o.uv2.x;                 o.uv2.x = o.uv2.y;                 o.uv2.y = x;                 UNITY_TRANSFER_FOG(o,o.vertex);                 return o;             }              fixed4 frag (v2f i) : SV_Target             {                 fixed4 col = tex2D(_MainTex, i.uv);                 fixed4 mask = tex2D(_MaskTex, i.uv2 + _Time.x * _Speed);                 col = mask + col;                 col.a = mask.a;                 return col;             }             ENDCG         }     } } <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043a\u043e\u043b\u044c\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0440\u043e\u0434\u0435 \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441 \u0438 \u0448\u0443\u043c\u0430. <strong>\u0412\u0430\u0436\u043d\u043e: <\/strong>\u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <em>Filter Mode<\/em> \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u0440\u0435\u0436\u0438\u043c Point, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0433\u043b\u0430\u0434\u044f\u0442 \u044d\u0442\u043e\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442.<\/p>\n<h2>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0430\u043c \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u0430\u043a \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u043b\u0438 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/github.com\/Nox7atra\/anim-curve-to-tex\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/699520\/\"> https:\/\/habr.com\/ru\/post\/699520\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0448\u0430 \u0414\u044f\u0434\u0438\u0447\u0435\u043d\u043a\u043e, \u0438 \u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043f\u043e\u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 2\u0434 \u043a\u0440\u0438\u0432\u044b\u0445. \u0422\u0430\u043a \u0436\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c Unity Animation Curve. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u0435\u0441\u0441\u0435\u0440\u0434\u0435\u0447\u043d\u0430. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0430\u043c\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0443\u044e \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c. \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u0442.\u043f. \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043a\u0440\u0438\u0432\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442. \u0421\u0438\u043d\u0443\u0441\u044b, \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u044b, \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c <a href=\"https:\/\/www.desmos.com\/calculator?lang=ru\" rel=\"noopener noreferrer nofollow\">desmos<\/a>, \u0442\u0430\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f \u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043e\u0431\u0440\u0430\u0432 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430<a href=\"https:\/\/habr.com\/ru\/post\/435828\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043a\u0440\u0438\u0432\u044b\u0435<\/a> \u0438 \u0442\u0430\u043c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u043e\u043b\u044c\u0444\u0440\u0430\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. \u041d\u043e \u0435\u0441\u0442\u044c \u043f\u0443\u0442\u044c \u043f\u0440\u043e\u0449\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0432\u044b\u0445. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Unity Animation Curve. \u0422\u0430\u043a \u0432\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<h2>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 \u0444\u043e\u043d\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 depth texture arkit \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637384300ca3379afa739df6\" data-style=\"\" id=\"637384300ca3379afa739df6\" width=\"\"><\/div>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/63738512c2b79400c82d4323\" data-style=\"\" id=\"63738512c2b79400c82d4323\" width=\"\"><\/div>\n<p>\u0422\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0435\u0435 \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u044c\u0444\u0443 \u0447\u0435\u0440\u0435\u0437 \u043a\u0440\u0438\u0432\u0443\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u0443\u044e \u043e\u0431\u0442\u0440\u0430\u0432\u043a\u0443. \u041f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0440\u0438\u0432\u0443\u044e \u0432 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0443 \u043a\u0440\u0438\u0432\u0443\u044e, \u043d\u043e \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043a\u0440\u0438\u0432\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Unity Animation Curve \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0438 \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0430\u043b\u044c\u0444\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637384fb8f11379b280abd88\" data-style=\"\" id=\"637384fb8f11379b280abd88\" width=\"\"><\/div>\n<p>\u041d\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u0440\u0438\u0432\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0436\u0435 \u0430\u043b\u044c\u0444\u044b \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><span><\/span><\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u0430. \u0427\u0442\u043e\u0436, \u0437\u0430\u0447\u0435\u043c \u0432\u0440\u043e\u0434\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438. \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/h2>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0432 Unity \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041a\u043b\u0430\u0441\u0441 <em>Texture2D<\/em> \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0438 \u043d\u0435 \u0442\u0430\u043a \u0434\u043e\u0440\u043e\u0433\u043e \u043f\u043e \u043f\u0435\u0440\u0444\u043e\u043c\u0430\u043d\u0441\u0443, \u0445\u043e\u0442\u044f \u043f\u0435\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u044f \u0431\u044b \u043d\u0435 \u0441\u0442\u0430\u043b. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>OnEnable<\/em> \u0441\u0430\u043c\u043e\u0435 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0441\u0446\u0435\u043d\u044b \u0438\u043b\u0438 \u0438\u0433\u0440\u044b \u043c\u044b \u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0432 1px. \u0418 \u0442\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 <em>TextureWrapMode<\/em>. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043a\u0440\u0438\u0432\u044b\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443. \u0410 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0444\u0444\u0435\u043a\u0442 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043a\u0430\u0436\u0435\u043c UV \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0435\u0448\u0430, \u0442\u043e:<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Clamp<\/strong><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 UV \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u043d\u0430\u0448\u0435\u0439 \u043a\u0440\u0438\u0432\u043e\u0439. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0432\u0435\u0437\u0434\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0430\u0439\u043b\u0438\u043d\u0433 2 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0438\u0437 \u0442\u0440\u0451\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0446\u0432\u0435\u0442\u0430 \u0432 \u043a\u0440\u0438\u0432\u044b\u0445.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Repeat<\/strong><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 UV. \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Mirror<\/strong><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 Repeat, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0445\u043e\u0434\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 UV \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0440\u0438\u0432\u0443\u044e. \u0423\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f &#171;\u043f\u0438\u043d\u043f\u043e\u043d\u0433&#187; \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c Mirror Once<\/strong><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u0440\u0438\u0432\u0443\u044e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a Clamp. <strong>\u0412\u0430\u0436\u043d\u043e: <\/strong>\u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 uv (-1, 1), \u0430 \u043d\u0435 (0,2). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b offset, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p><strong>\u0411\u0435\u0437\u043e\u0442\u0445\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0432 \u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<pre><code class=\"cs\">using UnityEngine; namespace Nox7atra {     public class AnimCurveToTex : MonoBehaviour     {         [SerializeField] private AnimationCurve _animationCurveR;         [SerializeField] private AnimationCurve _animationCurveG;         [SerializeField] private AnimationCurve _animationCurveB;         [SerializeField] private AnimationCurve _animationCurveA;         [SerializeField] private TextureWrapMode _wrapMode = TextureWrapMode.Clamp;         [SerializeField] private TextureFormat _textureFormat = TextureFormat.RGBA32;         [SerializeField] private FilterMode _filterMode = FilterMode.Point;         [Range(2, 256)]         [SerializeField] private int _textureResoluton = 128;         [SerializeField] private Material _targetMaterial;         [HideInInspector]         [SerializeField] private string _texturePropertyName;                  private Texture2D _texture;         private void OnValidate()         {             UpdateCurveTex();         }          private void OnEnable()         {             UpdateCurveTex();         }              private void UpdateCurveTex()         {             if(_targetMaterial == null) return;             _texture = new Texture2D(_textureResoluton, 1, _textureFormat, false)             {                 wrapMode = _wrapMode,                 filterMode = _filterMode,             };             for (int i = 0; i &lt; _texture.width; i++)             {                 var phase = (float) i \/ (_texture.width - 1);                 _texture.SetPixel(i, 0, new Color(                     _animationCurveR.Evaluate(phase),                      _animationCurveG.Evaluate(phase),                     _animationCurveB.Evaluate(phase),                     _animationCurveA.Evaluate(phase)                     ));             }             _texture.Apply();             _targetMaterial.SetTexture(_texturePropertyName, _texture);         }                  private void OnDestroy()         {             Destroy(_texture);         }     } }<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0435\u0449\u0451 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u044d\u0442\u043e \u043d\u0430 <em>TextureFormat<\/em>. \u0427\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0448\u0438\u043d\u0443 \u0433\u043f\u0443, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0432\u0440\u043e\u0434\u0435 R8 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043a\u0430\u043d\u0430\u043b. \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0432\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <em>UpdateCurveTex <\/em>\u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 <em>_textureResoluton <\/em>\u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0432 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0438 \u0431\u0435\u0437 mipmap (\u0432\u0440\u044f\u0434 \u043b\u0438 \u043e\u043d\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f). \u0414\u0430\u043b\u044c\u0448\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0431\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u0440\u0438\u0432\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u044d\u0442\u0443 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u043b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 <em>_texturePropertyName<\/em> \u0441\u043a\u0440\u044b\u0442 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435, \u0442\u043e \u043a\u0430\u043a \u043e\u043d \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f?<\/p>\n<h2>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438<\/h2>\n<p>\u041f\u0438\u0441\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0443\u0436\u043d\u043e\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0432 <em>_texturePropertyName <\/em>\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440. \u041e\u043d \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<pre><code class=\"cs\">using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.Rendering;  namespace Nox7atra {     [CustomEditor(typeof(AnimCurveToTex))]     public class AnimCurveToTex_Editor : Editor     {         private AnimCurveToTex _target;         private SerializedProperty _material;         private SerializedProperty _texturePropertyName;                  public void OnEnable()         {             _material = serializedObject.FindProperty(\"_targetMaterial\");             _texturePropertyName = serializedObject.FindProperty(\"_texturePropertyName\");         }          public override void OnInspectorGUI()         {             base.OnInspectorGUI();             var matNames = GetMaterialPropertyNames();             if (matNames != null)             {                 var index = matNames.IndexOf(_texturePropertyName.stringValue);                 if (index &lt; 0)                 {                     index = 0;                 }                 _texturePropertyName.stringValue = matNames[EditorGUILayout.Popup(index, matNames.ToArray())];                 _texturePropertyName.serializedObject.ApplyModifiedProperties();             }         }          public List&lt;string> GetMaterialPropertyNames()         {             var shader = (_material.objectReferenceValue as Material)?.shader;             if (shader == null)                 return null;             var count = shader.GetPropertyCount();             List&lt;string> materialPropertyNames = new List&lt;string>();              for (int i = 0; i &lt; count; i++)             {                 if (shader.GetPropertyType(i) == ShaderPropertyType.Texture)                 {                     var property = shader.GetPropertyName(i);                     if (!materialPropertyNames.Contains(property))                     {                         materialPropertyNames.Add(property);                     }                 }             }             return materialPropertyNames;         }     } }<\/code><\/pre>\n<p><em>SerializedProperty <\/em>\u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0443\u0436\u043d\u044b\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u044f \u043b\u0438\u0448\u043d\u0438\u0445 public \u043f\u043e\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0432 \u0431\u0438\u043b\u0434\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u044b \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0432 \u043d\u0430\u0448 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <em>GetMaterialPropertyNames. <\/em>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u043d\u0430\u0448 \u0448\u0435\u0439\u0434\u0435\u0440 \u0438 \u0438\u0449\u0435\u0442 \u0442\u0430\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0442\u0438\u043f\u0430 <em>ShaderPropertyType.Texture<\/em>. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435. <strong>\u0412\u0430\u0436\u043d\u043e: <\/strong>\u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <em>SerializedProperty <\/em>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>serializedObject.ApplyModifiedProperties().<\/em><\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0433\u043e\u0442\u043e\u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0432 \u0448\u0435\u0439\u0434\u0435\u0440.<\/p>\n<h2>\u0418 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/637393d13bf07c9b40049ab9\" data-style=\"\" id=\"637393d13bf07c9b40049ab9\" width=\"\"><\/div>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/strong><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><strong>\u0428\u0435\u0439\u0434\u0435\u0440<\/strong><\/p>\n<pre><code class=\"cpp\">Shader \"Unlit\/HologramShader\" {     Properties     {         _MainTex (\"Texture\", 2D) = \"white\" {}         _MaskTex (\"MaskTex\", 2D) = \"white\" {}         _Speed(\"Speed\", float) = 1     }     SubShader     {         Tags {\"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\"}         LOD 100          ZWrite Off         Blend SrcAlpha OneMinusSrcAlpha           Pass         {             CGPROGRAM             #pragma vertex vert             #pragma fragment frag             #include \"UnityCG.cginc\"              struct appdata             {                 float4 vertex : POSITION;                 float2 uv : TEXCOORD0;      <\/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-341278","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341278","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=341278"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/341278\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}