{"id":293873,"date":"2019-08-26T21:00:42","date_gmt":"2019-08-26T21:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293873"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293873","title":{"rendered":"C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 Unity UI. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0430\u0441\u0442\u0438\u0446"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442! \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 UI \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u0432 <i>Canvas<\/i>\u2019e.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0448\u0430 \u0438\u043b\u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oh\/_n\/xi\/oh_nxiy4ykruzark8hkpzjzvh5i.gif\" alt=\"image\"><\/div>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h2>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f UI \u0432 Unity \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <i>Canvas<\/i>. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u201c\u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u043e\u0439\u201d \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0435\u0439 UI-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  \u041b\u044e\u0431\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <i>Graphic <\/i>(\u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <i>MaskableGraphic<\/i>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 <i>CanvasRenderer <\/i>\u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>OnPopulateMesh<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430). \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f <i>VertexHelper<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0448\u0430 \u0434\u043b\u044f UI.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h2>\n<p>  <\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u0430<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <i>UIParticleSystem<\/i>, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <i>MaskableGraphic<\/i>. <i>MaskableGraphic <\/i>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430 <i>Graphic <\/i>\u0438 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043c\u0430\u0441\u043a\u0430\u043c\u0438. \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <i>OnPopulateMesh<\/i>. \u041e\u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <i>VertexHelper <\/i>\u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d \u043c\u0435\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<pre><code class=\"cs\">public class UIParticleSystem : MaskableGraphic {     protected override void OnPopulateMesh(VertexHelper vh)     {         vh.Clear();         ...         int particlesCount = ... ;         for (int i = 0; i &lt; particlesCount; i++)         {             Color vertexColor = ... ;             Vector2[] vertexUV = ... ;              UIVertex[] quadVerts = new UIVertex[4];             for (int j = 0; j &lt; 4; j++)             {                 Vector3 vertixPosition = ... ;                 quadVerts[j] = new UIVertex()                 {                     position = vertixPosition,                     color = vertexColor,                     uv0 = vertexUV                 };             }             vh.AddUIVertexQuad(quadVerts);         }     } }<\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c <i>VertextHelper <\/i>\u043e\u0442 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430 <i>Clear<\/i>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 <i>AddUIVertexQuad<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u043e 4-\u0445 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u0445. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d \u0438\u0437-\u0437\u0430 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0442.\u043a. \u043a\u0430\u0436\u0434\u0430\u044f \u0447\u0430\u0441\u0442\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a. \u041a\u0430\u0436\u0434\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <i>UIVertex<\/i>. \u0418\u0437 \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u0446\u0432\u0435\u0442 \u0438 \u043e\u0434\u043d\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b <i>uv <\/i>\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">VertexHelper<\/b><\/p>\n<div class=\"spoiler_text\"><i>VertexHelper <\/i>\u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u0445, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0430\u0440\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u043b\u0443\u0447\u0448\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u0430 <i>AddUIVertexStream<\/i>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0440\u0448\u0438\u043d \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.  <\/div>\n<\/div>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438\u0446, \u0438\u0445 \u0446\u0432\u0435\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043c\u0435\u0448 \u0434\u043b\u044f \u0438\u0445 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>SetVerticesDirty<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0444\u043b\u0430\u0433 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u043c\u0435\u0442\u043e\u0434\u0430 <i>OnPopulateMesh<\/i>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438 \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>SetMaterialDirty<\/i>.<\/p>\n<pre><code class=\"cs\">protected void Update() {     SetVerticesDirty(); } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>mainTexture<\/i>. \u041e\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0430\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f <i>CanvasRenderer <\/i>\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 \u0448\u0435\u0439\u0434\u0435\u0440\u0430 <i>_MainTex<\/i>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u0435 <i>ParticleImage<\/i>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <i>mainTexture<\/i>.<\/p>\n<pre><code class=\"cs\">public Texture ParticleImage; public override Texture mainTexture {     get { return ParticleImage; } }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0430\u0441\u0442\u0438\u0446<\/h3>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d \u043c\u0435\u0448\u0430 \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>ParticleSystem<\/i>, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0430\u043c\u0438 \u043f\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0447\u0430\u0441\u0442\u0438\u0446, \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0443, \u0446\u0432\u0435\u0442\u0443 \u0438 \u0442.\u0434.<br \/>  \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438\u0446 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>ParticleSystemRenderer<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0442\u0430\u043a \u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0448\u0430 \u0438 \u0435\u0433\u043e \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0432 UI \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u2014 <i>UIParticleSystem <\/i>\u0438 <i>CanvasRenderer<\/i>.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u044f \u0438 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>Awake<\/i>. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">UIBehaviour<\/b><\/p>\n<div class=\"spoiler_text\"><i>Awake<\/i>, \u043a\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432 <i>UIBehaviour<\/i>. \u0421\u0430\u043c \u043a\u043b\u0430\u0441\u0441 <i>UIBehaviour <\/i>\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 <i>Graphic<\/i>.  <\/div>\n<\/div>\n<p>  <\/p>\n<pre><code class=\"cs\">private ParticleSystem _particleSystem; private ParticleSystemRenderer _particleSystemRenderer; private ParticleSystem.MainModule _main; private ParticleSystem.Particle[] _particles;  protected override void Awake() {     base.Awake();      _particleSystem = GetComponent&lt;ParticleSystem&gt;();     _main = _particleSystem.main;          _particleSystemRenderer = GetComponent&lt;ParticleSystemRenderer&gt;();     _particleSystemRenderer.enabled = false;      int maxCount = _main.maxParticles;     _particles = new ParticleSystem.Particle[maxCount]; } <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0435 <i>_particles <\/i>\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0438\u0446 <i>ParticleSystem<\/i>, \u0430 <br \/>  <i>_main <\/i>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c <i>MainModule<\/i>.<\/p>\n<p>  \u0414\u043e\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <i>OnPopulateMesh<\/i>, \u0432\u0437\u044f\u0432 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <i>Vector3[] _quadCorners<\/i> \u0438 <i>Vector2[] _simpleUV<\/i>. <\/p>\n<p>  <i>_quadCorners <\/i>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b 4-\u0445 \u0443\u0433\u043b\u043e\u0432 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0447\u0430\u0441\u0442\u0438\u0446\u044b. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u0430\u043a \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438 1\u04451.<br \/>  <i>_simpleUV <\/i> \u2014 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b <i>uv <\/i>\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445 \u043b\u0438\u0431\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cs\">private Vector3[] _quadCorners = new Vector3[] {     new Vector3(-.5f, -.5f, 0),     new Vector3(-.5f, .5f, 0),     new Vector3(.5f, .5f, 0),     new Vector3(.5f, -.5f, 0) };  private Vector2[] _simpleUV = new Vector2[] {     new Vector2(0,0),     new Vector2(0,1),     new Vector2(1,1),     new Vector2(1,0), }; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">protected override void OnPopulateMesh(VertexHelper vh) {     vh.Clear();      int particlesCount = _particleSystem.GetParticles(_particles);      for (int i = 0; i &lt; particlesCount; i++)     {         var particle = _particles[i];          Vector3 particlePosition = particle.position;         Color vertexColor = particle.GetCurrentColor(_particleSystem) * color;         Vector3 particleSize = particle.GetCurrentSize3D(_particleSystem);          Vector2[] vertexUV = _simpleUV;         Quaternion rotation = Quaternion.AngleAxis(particle.rotation, Vector3.forward);          UIVertex[]quadVerts = new UIVertex[4];         for (int j = 0; j &lt; 4; j++)         {             Vector3 cornerPosition = rotation * Vector3.Scale(particleSize, _quadCorners[j]);             Vector3 vertexPosition = cornerPosition + particlePosition;             vertexPosition.z = 0;             quadVerts[j] = new UIVertex();             quadVerts[j].color = vertexColor;             quadVerts[j].uv0 = vertexUV[j];             quadVerts[j].position = vertexPosition;         }         vh.AddUIVertexQuad(quadVerts);     } } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">vertexPosition<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0435\u0451 \u0440\u0430\u0437\u043c\u0435\u0440 (\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f <i>Vector3.Scale(particleSize, _quadCorners[j])<\/i>) \u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0432\u0430\u0442\u0435\u0440\u043d\u0438\u043e\u043d\u0430 <i>rotation <\/i>\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440). \u041f\u043e\u0441\u043b\u0435 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438\u0446\u044b  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 UI, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jo\/aw\/fq\/joawfqnuoevb8sr9spfah6-rww0.jpeg\" alt=\"image\"><\/p>\n<p>  \u041a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 <i>ParticleSystem <\/i>\u0434\u043e\u0431\u0430\u0432\u0438\u043c <i>UIParticleSystem<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j4\/jj\/ca\/j4jjcaimsgxf0bwgmkbu_lld3gi.jpeg\" alt=\"image\"><\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0446\u0435\u043d\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ow\/lb\/d4\/owlbd4oqkkdt9dl1twid2po-o1i.gif\" alt=\"image\"><\/p>\n<p>  \u0427\u0430\u0441\u0442\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0445 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0430\u0441\u043a\u0438. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0439, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>Rendere Mode<\/i> \u0443 <i>Canvas<\/i>, \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0432 <i>Canvas <\/i>\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0451\u043c.<\/p>\n<h4>SimulationSpace<\/h4>\n<p>  \u0422.\u043a. \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0430\u0441\u0442\u0438\u0446 \u0432\u043d\u0443\u0442\u0440\u0438 UI, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <i>SimulationSpace<\/i>. \u041f\u0440\u0438 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0432 \u043c\u0438\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043c, \u0433\u0434\u0435 \u0434\u043e\u043b\u0436\u043d\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<pre><code class=\"cs\">protected override void OnPopulateMesh(VertexHelper vh) {     ...     Vector3 particlePosition;         switch (_main.simulationSpace)         {             case ParticleSystemSimulationSpace.World:                 particlePosition = _rectTransform.InverseTransformPoint(particle.position);                 break;             case ParticleSystemSimulationSpace.Local:                 particlePosition = particle.position;                 break;             case ParticleSystemSimulationSpace.Custom:                 if (_main.customSimulationSpace != null)                     particlePosition = _rectTransform.InverseTransformPoint( _main.customSimulationSpace.TransformPoint(particle.position) );                 else                     particlePosition = particle.position;                 break;             default:                 particlePosition = particle.position;                 break;         }     ... }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0418\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 ParticleSystemRenderer<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 <i>ParticleSystemRenderer<\/i>. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>RenderMode<\/i>, <i>SortMode<\/i>, <i>Pivot<\/i>.<\/p>\n<h4>RenderMode<\/h4>\n<p>  \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0445\u043e\u043b\u0441\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: <i>Billboard <\/i>\u0438 <i>StretchedBillboard<\/i>. <br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0432\u043e\u0451 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <i>CanvasParticleSystemRenderMode<\/i>.<\/p>\n<pre><code class=\"cs\">public enum CanvasParticleSystemRenderMode {     Billboard = 0,     StretchedBillboard = 1 } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">public CanvasParticleSystemRenderMode RenderMode; public float SpeedScale = 0f; public float LengthScale = 1f;  protected override void OnPopulateMesh(VertexHelper vh) {     ...     Quaternion rotation;     switch (RenderMode)     {         case CanvasParticleSystemRenderMode.Billboard:             rotation = Quaternion.AngleAxis(particle.rotation, Vector3.forward);             break;         case CanvasParticleSystemRenderMode.StretchedBillboard:             rotation = Quaternion.LookRotation(Vector3.forward, particle.totalVelocity);             float speed = particle.totalVelocity.magnitude;             particleSize = Vector3.Scale(particleSize, new Vector3(LengthScale + speed * SpeedScale, 1f, 1f));             rotation *= Quaternion.AngleAxis(90, Vector3.forward);             break;         default:             rotation = Quaternion.AngleAxis(particle.rotation, Vector3.forward);             break;     }     ... }<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <i>StretchedBillboard<\/i>, \u0440\u0430\u0437\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <i>LengthScale <\/i>\u0438 <i>SpeedScale<\/i>, \u0430 \u0435\u0451 \u043f\u043e\u0432\u043e\u0440\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x9\/pl\/um\/x9plumx0rkcnjq-0gialrkkb2oc.gif\" alt=\"image\"><\/p>\n<h4>SortMode<\/h4>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <i>CanvasParticlesSortMode<\/i>. \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0438\u0437\u043d\u0438 \u0447\u0430\u0441\u0442\u0438\u0446.<\/p>\n<pre><code class=\"cs\">public enum CanvasParticlesSortMode {     None = 0,     OldestInFront = 1,     YoungestInFront = 2 }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">public CanvasParticlesSortMode SortMode;<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0438\u0437\u043d\u0438 \u0447\u0430\u0441\u0442\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>_particleElapsedLifetime<\/i>. \u0421\u0430\u043c\u0443 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <i>Array.Sort<\/i>.<\/p>\n<pre><code class=\"cs\">private float[] _particleElapsedLifetime;  protected override void Awake() {     ...     _particles = new ParticleSystem.Particle[maxCount];     _particleElapsedLifetime = new float[maxCount]; }  protected override void OnPopulateMesh(VertexHelper vh) {     vh.Clear();      int particlesCount = _particleSystem.GetParticles(_particles);     for (int i = 0; i &lt; particlesCount; i++)             _particleElapsedLifetime[i] = _particles[i].startLifetime - _particles[i].remainingLifetime;      switch (SortMode)     {         case CanvasParticlesSortMode.None: break;         case CanvasParticlesSortMode.OldestInFront:             Array.Sort(_particleElapsedLifetime, _particles, 0, particlesCount,Comparer&lt;float&gt;.Default);             Array.Reverse(_particles, 0, particlesCount);         break;         case CanvasParticlesSortMode.YoungestInFront:             Array.Sort(_particleElapsedLifetime, _particles, 0, particlesCount, Comparer&lt;float&gt;.Default);         break;     }     ...  }<\/code><\/pre>\n<p>  <\/p>\n<h3>Pivot<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u0435 <i>Pivot<\/i>, \u0434\u043b\u044f \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0447\u0430\u0441\u0442\u0438\u0446\u044b.<\/p>\n<pre><code class=\"cs\">public Vector3 Pivot = Vector3.zero; <\/code><\/pre>\n<p>  \u0418 \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"cs\">Vector3 cornerPosition = Vector3.Scale(particleSize, _quadCorners[j] + Pivot); Vector3 vertexPosition = rotation * cornerPosition + particlePosition; vertexPosition.z = 0; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0420\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0430\u0441\u0442\u0438\u0446, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u2014 <i>shape <\/i>\u0431\u044b\u043b \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i>OnRectTransformDimensionsChange <\/i>\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>RectTransform<\/i>. \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 shape \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 <i>RectTransform<\/i>.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>RectTransform <\/i>\u0438 \u043c\u043e\u0434\u0443\u043b\u044f <i>ShapeModule<\/i>. \u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f shape \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>ScaleShapeByRectTransform<\/i>.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431.<\/p>\n<pre><code class=\"cs\">private RectTransform _rectTransform; private ParticleSystem.ShapeModule _shape;  public bool ScaleShapeByRectTransform;  protected override void Awake() {     ...         _rectTransform = GetComponent&lt;RectTransform&gt;();         _shape = _particleSystem.shape;     ... }  protected override void OnEnable() {     base.OnEnable();     ScaleShape(); }  protected override void OnRectTransformDimensionsChange() {     base.OnRectTransformDimensionsChange();     ScaleShape(); }  protected void ScaleShape() {     if (!ScaleShapeByRectTransform)         return;      Rect rect = _rectTransform.rect;     var scale = Quaternion.Euler(_shape.rotation) * new Vector3(rect.width, rect.height, 0);     scale = new Vector3(Mathf.Abs(scale.x), Mathf.Abs(scale.y), Mathf.Abs(scale.z));     _shape.scale = scale; } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u043f\u043e\u0432\u043e\u0440\u043e\u0442 <i>Shape<\/i>\u2019\u0430. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0447\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0438\u0446.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 <i>RectTransform<\/i>, \u0441 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u043e\u0439 \u043a \u043d\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438\u0446.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mg\/5p\/8u\/mg5p8ukxutwtnw4pwysqfshgnuc.gif\" alt=\"image\"><\/p>\n<h2>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <i>OnRectTransformDimensionsChange<\/i>, \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b <i>OnPopulateMesh <\/i>\u0438 <i>OnRectTransformDimensionsChange<\/i>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ExecuteInEditMode<\/b><\/p>\n<div class=\"spoiler_text\">\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <i>ExecuteInEditMode <\/i>\u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0442.\u043a. <i>Graphic <\/i>\u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435.  <\/div>\n<\/div>\n<p>  <\/p>\n<pre><code class=\"cs\">private bool _initialized;  protected void Initialize() {     if (_initialized)         return;     _initialized = true;     _rectTransform = GetComponent&lt;RectTransform&gt;();     _particleSystem = GetComponent&lt;ParticleSystem&gt;();      _main = _particleSystem.main;     _textureSheetAnimation = _particleSystem.textureSheetAnimation;     _shape = _particleSystem.shape;      _particleSystemRenderer = GetComponent&lt;ParticleSystemRenderer&gt;();     _particleSystemRenderer.enabled = false;     _particleSystemRenderer.material = null;      var maxCount = _main.maxParticles;     _particles = new ParticleSystem.Particle[maxCount];     _particlesLifeProgress = new float[maxCount];     _particleRemainingLifetime = new float[maxCount];                 }  protected override void Awake() {     base.Awake();     Initialize(); }  protected override void OnPopulateMesh(VertexHelper vh) {     Initialize();     ... }  protected override void OnRectTransformDimensionsChange() { #if UNITY_EDITOR     Initialize(); #endif     ... }<\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 <i>OnRectTransformDimensionsChange <\/i>\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435 <i>Awake<\/i>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 \u0447\u0430\u0441\u0442\u0438\u0446 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0435\u0439, \u043d\u0435\u0436\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <i>ParticleSystemRenderer<\/i>, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u043b\u0438\u0432\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <i>Canvas <\/i>\u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <i>Dirty<\/i>, \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0443 \u0432\u0441\u0435\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 <i>Canvas <\/i>\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438. \u0415\u0441\u043b\u0438 UI \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0438 \u0435\u0451 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0445\u043e\u043b\u0441\u0442\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/q7\/ri\/o6\/q7rio6go21xszatko5jp0fc4c0k.gif\" alt=\"image\"><\/p>\n<p>  P.S.: \u0412\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0434\u0435\u043c\u043e-\u0441\u0446\u0435\u043d\u044b <a href=\"https:\/\/gitlab.com\/Dimonik333\/uiparticlesystem\"> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 git<\/a>.<br \/>  \u0417\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u0447\u0430\u0442\u0430 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ParticleSystem \u0432 UI. \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0439 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0430 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0431\u044b\u043b\u0438 \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u043e \u0437\u0430 \u043f\u0430\u0440\u0443 \u0434\u043d\u0435\u0439 \u0434\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0441\u043e\u0431\u0438\u0440\u0430\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0430\u0448\u0451\u043b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 Graphic.OnPopulateMesh. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c <a href=\"https:\/\/bitbucket.org\/UnityUIExtensions\/unity-ui-extensions\/wiki\/Controls\/UIParticleSystem\">\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/464961\/\"> https:\/\/habr.com\/ru\/post\/464961\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442! \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 UI \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0446 \u0432 <i>Canvas<\/i>\u2019e.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0448\u0430 \u0438\u043b\u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oh\/_n\/xi\/oh_nxiy4ykruzark8hkpzjzvh5i.gif\" alt=\"image\"><\/div>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-293873","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293873","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=293873"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293873\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}