{"id":669,"date":"2025-09-22T15:26:41","date_gmt":"2025-09-22T11:56:41","guid":{"rendered":"https:\/\/rayalancer.ir\/?p=669"},"modified":"2025-09-22T18:39:02","modified_gmt":"2025-09-22T15:09:02","slug":"%da%a9%d8%af-%d8%a7%d8%b2-%d8%a8%db%8c%d9%86-%d8%a8%d8%b1%d8%af%d9%86-%d8%af%d8%b1-%db%8c%d9%88%d9%86%db%8c%d8%aa%db%8c-destroy","status":"publish","type":"post","link":"https:\/\/rayalancer.ir\/?p=669","title":{"rendered":"\u06a9\u062f  \u0627\u0632 \u0628\u06cc\u0646 \u0628\u0631\u062f\u0646 \u062f\u0631 \u06cc\u0648\u0646\u06cc\u062a\u06cc Destroy"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>Destroy (gameobject,2);<\/code><\/pre>\n\n\n\n<p>\u062f\u0631 \u06a9\u062f \u0628\u0627\u0644\u0627\u060c \u06af\u06cc\u0645\u200c\u0622\u0628\u062c\u06a9\u062a\u06cc \u06a9\u0647 \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 \u0622\u0646 \u0646\u0633\u0628\u062a \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u067e\u0633 \u0627\u0632 \u06af\u0630\u0634\u062a \u06f2 \u062b\u0627\u0646\u06cc\u0647 \u0627\u0632 \u0635\u062d\u0646\u0647 \u062d\u0630\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0627\u0648\u0644: \u0646\u0627\u0645 \u06af\u06cc\u0645\u200c\u0622\u0628\u062c\u06a9\u062a (\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0648 \u0628\u0631\u0627\u06cc \u0634\u0646\u0627\u0633\u0627\u06cc\u06cc \u0627\u0633\u062a)<\/li>\n\n\n\n<li>\u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u062f\u0648\u0645: \u0632\u0645\u0627\u0646 \u062a\u0623\u062e\u06cc\u0631 (\u0628\u0647 \u062b\u0627\u0646\u06cc\u0647) \u0642\u0628\u0644 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u0639\u0645\u0644\u06cc\u0627\u062a \u062d\u0630\u0641<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u0646\u06a9\u062a\u0647:<\/h3>\n\n\n\n<p>\u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u062f \u0642\u0628\u0644 \u0627\u0632 \u062d\u0630\u0641 \u0639\u0645\u0644\u06cc\u0627\u062a\u06cc \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f (\u0645\u062b\u0644\u0627\u064b \u067e\u062e\u0634 \u0635\u062f\u0627 \u06cc\u0627 \u0627\u0646\u06cc\u0645\u06cc\u0634\u0646)\u060c \u0628\u0627\u06cc\u062f \u0627\u0632 <code>Invoke<\/code> \u06cc\u0627 <code>Coroutine<\/code> \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u060c \u0686\u0648\u0646 <code>Destroy<\/code> \u0641\u0642\u0637 \u062d\u0630\u0641 \u0631\u0627 \u0632\u0645\u0627\u0646\u200c\u0628\u0646\u062f\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u06a9\u062f \u0628\u0639\u062f \u0627\u0632 \u0622\u0646 \u0627\u062c\u0631\u0627 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n\n\n\n<p>\u0645\u062b\u0627\u0644 \u0628\u0627 <code>Coroutine<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>StartCoroutine(DestroyAfterDelay(2f));\n\nIEnumerator DestroyAfterDelay(float delay)\n{\n    yield return new WaitForSeconds(delay);\n    \/\/ \u0627\u06cc\u0646\u062c\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0642\u0628\u0644 \u0627\u0632 Destroy \u06a9\u0627\u0631\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f\n    Debug.Log(\"\u062f\u0631 \u062d\u0627\u0644 \u062d\u0630\u0641 \u06af\u06cc\u0645\u200c\u0622\u0628\u062c\u06a9\u062a...\");\n    Destroy(gameObject);\n}<\/code><\/pre>\n\n\n\n<p>\u0646\u0627\u0628\u0648\u062f \u06a9\u0631\u062f\u0646 \u062f\u0631 \u06cc\u0648\u0646\u06cc\u062a\u06cc      \u067e\u0627\u06a9 \u06a9\u0631\u062f\u0646 \u062f\u0631 \u06cc\u0648\u0646\u06cc\u062a\u06cc  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u06a9\u062f \u0628\u0627\u0644\u0627\u060c \u06af\u06cc\u0645\u200c\u0622\u0628\u062c\u06a9\u062a\u06cc \u06a9\u0647 \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0647 \u0622\u0646 \u0646\u0633\u0628\u062a \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u067e\u0633 \u0627\u0632 \u06af\u0630\u0634\u062a \u06f2 \u062b\u0627\u0646\u06cc\u0647 \u0627\u0632 \u0635\u062d\u0646\u0647 \u062d\u0630\u0641 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0646\u06a9\u062a\u0647: \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u062f \u0642\u0628\u0644 \u0627\u0632 \u062d\u0630\u0641 \u0639\u0645\u0644\u06cc\u0627\u062a\u06cc \u0627\u0646\u062c\u0627\u0645&hellip;<\/p>\n","protected":false},"author":1,"featured_media":670,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,19],"tags":[],"class_list":["post-669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-55","category-19"],"_links":{"self":[{"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts\/669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=669"}],"version-history":[{"count":1,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts\/669\/revisions"}],"predecessor-version":[{"id":671,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts\/669\/revisions\/671"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/media\/670"}],"wp:attachment":[{"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}