{"id":345211,"date":"2023-02-09T21:00:54","date_gmt":"2023-02-09T21:00:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345211"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-02-09T21:00:54","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345211","title":{"rendered":"<span>\u0418\u0437 Unity \u0432 Unigine. GameObject \u0438 Node<\/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\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e <strong>Unigine<\/strong> \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 Api \u043d\u0430 C# \u0438 C++. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f C# (\u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u0438 \u0434\u043b\u044f C++).<\/p>\n<p>\u0412\u0441\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0441\u0446\u0435\u043d\u0435 <strong>Unity<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 GameObject. \u0412 <strong>Unigine<\/strong> \u043a\u0430\u0436\u0434\u044b\u0439 &#171;\u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442&#187; \u0432 \u043c\u0438\u0440\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0438\u0434\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 Node.<\/p>\n<h3>\u041c\u0438\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u0432 <strong>Unigine<\/strong> (\u043a\u0430\u043a \u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 <strong>Unity<\/strong>) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\/\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0430\u043a \u0438 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439\/\u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u043d\u043e\u0434\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 <strong>Unigine<\/strong> \u043c\u0438\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u041c\u0430\u0442\u0440\u0438\u0446\u044b \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 3*4. <\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/75d\/88b\/508\/75d88b50897e296e1097edfed7fab6e1.png\" alt=\"\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043c\u0438\u0440\u043e\u0432\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.\" title=\"\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043c\u0438\u0440\u043e\u0432\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.\" width=\"795\" height=\"264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75d\/88b\/508\/75d88b50897e296e1097edfed7fab6e1.png\"\/><figcaption>\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043c\u0438\u0440\u043e\u0432\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/figcaption><\/figure>\n<p><a href=\"https:\/\/developer.unigine.com\/docs\/future\/code\/fundamentals\/matrix_transformations\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u041c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a>  <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.position (transform.localPosition)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.WorldPosition (node.Position)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.rotation (transform.localRotation)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.GetWorldRotation (node.GetRotation)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.localScale  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.WorldScale (node.Scale)  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043d\u043e\u0434\u044b \u0441 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u043c \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u041c\u0430\u0442\u0440\u0438\u0446\u044b \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f node.WorldTransform = MathLib.SetTo(newPosition, newPosition + direction, vec3.UP, MathLib.AXIS.Y);<\/code><\/pre>\n<h3>\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043d\u043e\u0434\u044b<\/h3>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434, \u0442\u0430\u043a \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u043d\u043e\u0434\u0443, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0432 \u043c\u0438\u0440\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.childCount  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.NumChildren  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.parent  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.Parent  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.GetChild(index)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.GetChild(index)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.SetParent(transform)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.SetWorldParent(node)  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/367\/f13\/266\/367f13266800e62bd9f992586d7621a8.png\" alt=\"\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043d\u043e\u0434\" title=\"\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043d\u043e\u0434\" width=\"344\" height=\"334\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/367\/f13\/266\/367f13266800e62bd9f992586d7621a8.png\"\/><figcaption>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043d\u043e\u0434<\/figcaption><\/figure>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434 for(int i = 0; i &lt; node.NumChildren; i++)   node.GetChild(i).DeleteLater();<\/code><\/pre>\n<p><a href=\"https:\/\/developer.unigine.com\/docs\/future\/api\/library\/nodes\/class.node\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445\/\u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445<\/a>  <\/p>\n<h3>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/h3>\n<p>\u041d\u043e\u0434\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0434\u043e\u0432, \u043d\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \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 Component \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (Init, Update, Shutdown) \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 Node Components.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8c1\/e93\/665\/8c1e93665f3a0f78e6c5bc4f1262270a.png\" alt=\"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u043e\u0434\u044b \u0442\u0438\u043f\u0430 PlayerActor\" title=\"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u043e\u0434\u044b \u0442\u0438\u043f\u0430 PlayerActor\" width=\"460\" height=\"426\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8c1\/e93\/665\/8c1e93665f3a0f78e6c5bc4f1262270a.png\"\/><figcaption>\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u043e\u0434\u044b \u0442\u0438\u043f\u0430 PlayerActor<\/figcaption><\/figure>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 SDK C# \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 <strong>\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/strong>, \u0430 \u0432 C++ \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0430.<\/p>\n<pre><code class=\"cpp\">Unigine::ComponentSystem::get()->initialize(); \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 C++<\/code><\/pre>\n<pre><code class=\"cs\">Unigine.ComponentSystem.SetEnabled(false); \/\/\u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 C#<\/code><\/pre>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u043d\u043e\u0434\u044b, \u043a\u0430\u043a \u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 Unity, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c GetComponent&lt;T>(), \u0433\u0434\u0435 T &#8212; \u0442\u0438\u043f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u043d\u043e\u0434\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u043c AddComponent&lt;T>() \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c RemoveComponent&lt;T>().<\/p>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 node.AddComponent&lt;TestComponent>();  TestComponent testComponent = node.GetComponent&lt;TestComponent>(); testComponent.TestMethod( DateTime.UtcNow );  node.RemoveComponent&lt;TestComponent>();<\/code><\/pre>\n<p><a href=\"https:\/\/developer.unigine.com\/ru\/docs\/latest\/api\/library\/common\/logic\/component_system\/cs\/class.componentsystem?rlang=cpp&amp;autotranslate=ru#removeComponent_Node_int\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a><\/p>\n<h3>\u041f\u043e\u0438\u0441\u043a \u043d\u043e\u0434 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0434\u0443 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 <strong>\u041d\u0415 \u0420\u0415\u041a\u041e\u041c\u0415\u041d\u0414\u0423\u0415\u0422\u0421\u042f<\/strong> \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0432 \u043c\u0438\u0440\u0435, \u0433\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0434.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Find(string)<\/p>\n<\/td>\n<td>\n<p align=\"center\">World.GetNodeByName(string)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.FindObjectsOfType&lt;T><\/p>\n<\/td>\n<td>\n<p align=\"center\">FindComponentsInWorld&lt;T><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.Find(string)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.FindNode(string)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u043e\u0438\u0441\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u043c\u0438\u0440\u0435 CharacterController characterController = FindComponentInWorld&lt;CharacterController>(); characterController.SetPlayer( node as Player );<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0434<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043d\u043e\u0434\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0434\u044b \u0441 \u043d\u0443\u043b\u044f \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0435\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Instantiate(GameObject)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.Clone() \u0438\u043b\u0438 World.LoadNode(string)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Destroy(GameObject)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.DeleteLater()<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0434\u044b Node cloneNode = node.Clone();  for(int i = 0; i &lt; cloneNode.NumChildren; i++)   cloneNode.GetChild(i).DeleteLater();<\/code><\/pre>\n<p><a href=\"https:\/\/unigine.com\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 Unigine<\/a><\/p>\n<p><a href=\"https:\/\/developer.unigine.com\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Unigine<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/715998\/\"> https:\/\/habr.com\/ru\/post\/715998\/<\/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\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e <strong>Unigine<\/strong> \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 Api \u043d\u0430 C# \u0438 C++. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f C# (\u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u0438 \u0434\u043b\u044f C++).<\/p>\n<p>\u0412\u0441\u0435 \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0441\u0446\u0435\u043d\u0435 <strong>Unity<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 GameObject. \u0412 <strong>Unigine<\/strong> \u043a\u0430\u0436\u0434\u044b\u0439 &#171;\u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442&#187; \u0432 \u043c\u0438\u0440\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0438\u0434\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 Node.<\/p>\n<h3>\u041c\u0438\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u0432 <strong>Unigine<\/strong> (\u043a\u0430\u043a \u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 <strong>Unity<\/strong>) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\/\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0430\u043a \u0438 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439\/\u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u043d\u043e\u0434\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0412 <strong>Unigine<\/strong> \u043c\u0438\u0440\u043e\u0432\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u041c\u0430\u0442\u0440\u0438\u0446\u044b \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 3*4. <\/p>\n<figure class=\"bordered full-width\"><figcaption>\u041f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0435\u0439 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u043c\u0438\u0440\u043e\u0432\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/figcaption><\/figure>\n<p><a href=\"https:\/\/developer.unigine.com\/docs\/future\/code\/fundamentals\/matrix_transformations\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u041c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a>  <\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.position (transform.localPosition)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.WorldPosition (node.Position)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.rotation (transform.localRotation)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.GetWorldRotation (node.GetRotation)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"351\" width=\"351\">\n<p align=\"center\">transform.localScale  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.WorldScale (node.Scale)  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043d\u043e\u0434\u044b \u0441 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u043c \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u041c\u0430\u0442\u0440\u0438\u0446\u044b \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f node.WorldTransform = MathLib.SetTo(newPosition, newPosition + direction, vec3.UP, MathLib.AXIS.Y);<\/code><\/pre>\n<h3>\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043d\u043e\u0434\u044b<\/h3>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043d\u043e\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434, \u0442\u0430\u043a \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u043d\u043e\u0434\u0443, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0432 \u043c\u0438\u0440\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.childCount  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.NumChildren  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.parent  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.Parent  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.GetChild(index)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.GetChild(index)  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.SetParent(transform)  <\/p>\n<\/td>\n<td>\n<p align=\"center\">node.SetWorldParent(node)  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<figure class=\"\"><figcaption>\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043d\u043e\u0434<\/figcaption><\/figure>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434 for(int i = 0; i &lt; node.NumChildren; i++)   node.GetChild(i).DeleteLater();<\/code><\/pre>\n<p><a href=\"https:\/\/developer.unigine.com\/docs\/future\/api\/library\/nodes\/class.node\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445\/\u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u0445<\/a>  <\/p>\n<h3>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/h3>\n<p>\u041d\u043e\u0434\u044b \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0434\u043e\u0432, \u043d\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \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 Component \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (Init, Update, Shutdown) \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 Node Components.<\/p>\n<figure class=\"\"><figcaption>\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u043e\u0434\u044b \u0442\u0438\u043f\u0430 PlayerActor<\/figcaption><\/figure>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 SDK C# \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 <strong>\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/strong>, \u0430 \u0432 C++ \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0430.<\/p>\n<pre><code class=\"cpp\">Unigine::ComponentSystem::get()->initialize(); \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 C++<\/code><\/pre>\n<pre><code class=\"cs\">Unigine.ComponentSystem.SetEnabled(false); \/\/\u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 C#<\/code><\/pre>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c \u043d\u043e\u0434\u044b, \u043a\u0430\u043a \u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 Unity, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c GetComponent&lt;T>(), \u0433\u0434\u0435 T &#8212; \u0442\u0438\u043f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u043d\u043e\u0434\u0443 \u043c\u0435\u0442\u043e\u0434\u043e\u043c AddComponent&lt;T>() \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c RemoveComponent&lt;T>().<\/p>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 node.AddComponent&lt;TestComponent>();  TestComponent testComponent = node.GetComponent&lt;TestComponent>(); testComponent.TestMethod( DateTime.UtcNow );  node.RemoveComponent&lt;TestComponent>();<\/code><\/pre>\n<p><a href=\"https:\/\/developer.unigine.com\/ru\/docs\/latest\/api\/library\/common\/logic\/component_system\/cs\/class.componentsystem?rlang=cpp&amp;autotranslate=ru#removeComponent_Node_int\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a><\/p>\n<h3>\u041f\u043e\u0438\u0441\u043a \u043d\u043e\u0434 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/h3>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0434\u0443 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 <strong>\u041d\u0415 \u0420\u0415\u041a\u041e\u041c\u0415\u041d\u0414\u0423\u0415\u0422\u0421\u042f<\/strong> \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0432 \u043c\u0438\u0440\u0435, \u0433\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0434.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Find(string)<\/p>\n<\/td>\n<td>\n<p align=\"center\">World.GetNodeByName(string)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.FindObjectsOfType&lt;T><\/p>\n<\/td>\n<td>\n<p align=\"center\">FindComponentsInWorld&lt;T><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">transform.Find(string)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.FindNode(string)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u043e\u0438\u0441\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u043c\u0438\u0440\u0435 CharacterController characterController = FindComponentInWorld&lt;CharacterController>(); characterController.SetPlayer( node as Player );<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0434<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043d\u043e\u0434\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0434\u044b \u0441 \u043d\u0443\u043b\u044f \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0435\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">Unity<\/p>\n<\/td>\n<td>\n<p align=\"center\">Unigine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Instantiate(GameObject)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.Clone() \u0438\u043b\u0438 World.LoadNode(string)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">GameObject.Destroy(GameObject)<\/p>\n<\/td>\n<td>\n<p align=\"center\">node.DeleteLater()<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0434\u044b Node cloneNode = node.Clone();  for(int i = 0; i &lt; cloneNode.NumChildren; i++)   cloneNode.GetChild(i).DeleteLater();<\/code><\/pre>\n<p><a href=\"https:\/\/unigine.com\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 Unigine<\/a><\/p>\n<p><a href=\"https:\/\/developer.unigine.com\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Unigine<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/715998\/\"> https:\/\/habr.com\/ru\/post\/715998\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345211","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345211","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=345211"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345211\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}