{"id":672,"date":"2025-09-22T15:33:04","date_gmt":"2025-09-22T12:03:04","guid":{"rendered":"https:\/\/rayalancer.ir\/?p=672"},"modified":"2025-09-22T18:38:58","modified_gmt":"2025-09-22T15:08:58","slug":"%d8%b1%d9%81%d8%aa%d9%86-%d8%a8%d9%87-scene-%d8%af%db%8c%da%af%d8%b1-%d8%af%d8%b1-unity-c","status":"publish","type":"post","link":"https:\/\/rayalancer.ir\/?p=672","title":{"rendered":"\u0631\u0641\u062a\u0646 \u0628\u0647 Scene \u062f\u06cc\u06af\u0631 \u062f\u0631 Unity (C#)"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u06f1. \u0627\u0628\u062a\u062f\u0627 Scene \u0647\u0627 \u0631\u0627 \u0628\u0647 Build Settings \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0627\u0632 \u0645\u0646\u0648\u06cc \u0628\u0627\u0644\u0627\u06cc Unity:<br><strong>File \u2192 Build Settings<\/strong><\/li>\n\n\n\n<li>Scene \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u0631\u0627 \u0627\u0632 \u067e\u0646\u062c\u0631\u0647 Project \u0628\u0647 \u0644\u06cc\u0633\u062a Scenes in Build \u0628\u06a9\u0634\u06cc\u062f (\u06cc\u0627 \u062f\u06a9\u0645\u0647 <strong>Add Open Scenes<\/strong> \u0631\u0627 \u0628\u0632\u0646\u06cc\u062f).<\/li>\n\n\n\n<li>\u062a\u0631\u062a\u06cc\u0628 Scene \u0647\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u0644\u06cc\u0633\u062a \u0645\u0647\u0645 \u0627\u0633\u062a\u060c \u0686\u0648\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u0627\u0646\u062f\u06cc\u0633 (index) \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06a9\u0646\u06cc\u062f.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u06f2. \u062f\u0631 \u06a9\u062f C# \u0627\u0632 <code>SceneManager.LoadScene<\/code> \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u0627\u0644\u0641) \u0644\u0648\u062f Scene \u0628\u0627 \u0646\u0627\u0645:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>using UnityEngine;\nusing UnityEngine.SceneManagement;\n\npublic class SceneChanger : MonoBehaviour\n{\n    public void LoadSceneByName(string sceneName)\n    {\n        SceneManager.LoadScene(sceneName);\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u0645\u062b\u0627\u0644 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>LoadSceneByName(\"MainMenu\");<\/code><\/pre>\n\n\n\n<p>\u0631\u0648\u0634 \u0642\u062f\u06cc\u0645\u06cc \u067e\u0631\u06a9\u0627\u0631\u0628\u0631\u062f \u062f\u0631 \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u0642\u062f\u06cc\u0645\u06cc \u062a\u0631<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Application.LoadLevel(\"\u0646\u0627\u0645 \u0645\u0631\u062d\u0644\u0647\");<\/code><\/pre>\n\n\n\n<p>\u0631\u0641\u062a\u0646 \u0628\u0647 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f \u062f\u0631 \u06cc\u0648\u0646\u06cc\u062a\u06cc    \u06a9\u062f \u0631\u0641\u062a\u0646 \u0628\u0647 \u0633\u06cc\u0646 \u062f\u06cc\u06af\u0631 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u06f1. \u0627\u0628\u062a\u062f\u0627 Scene \u0647\u0627 \u0631\u0627 \u0628\u0647 Build Settings \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f: \u06f2. \u062f\u0631 \u06a9\u062f C# \u0627\u0632 SceneManager.LoadScene \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f: \u0627\u0644\u0641) \u0644\u0648\u062f Scene \u0628\u0627 \u0646\u0627\u0645: \u0645\u062b\u0627\u0644 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc: \u0631\u0648\u0634 \u0642\u062f\u06cc\u0645\u06cc \u067e\u0631\u06a9\u0627\u0631\u0628\u0631\u062f \u062f\u0631 \u0646\u0633\u062e\u0647&hellip;<\/p>\n","protected":false},"author":1,"featured_media":673,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,19],"tags":[],"class_list":["post-672","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\/672","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=672"}],"version-history":[{"count":3,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":676,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions\/676"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=\/wp\/v2\/media\/673"}],"wp:attachment":[{"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rayalancer.ir\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}