{"id":32111,"date":"2024-11-01T09:05:45","date_gmt":"2024-11-01T09:05:45","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=32111"},"modified":"2024-11-01T11:33:15","modified_gmt":"2024-11-01T11:33:15","slug":"unity-basics-course-creating-an-ending-screen-defeat","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/32111\/","title":{"rendered":"Unity Basics Course: Creating an Ending Screen (Defeat)"},"content":{"rendered":"<p><body><\/p>\n<p>\n        In game development, the ending screen is an important element that wraps up the player experience. In this tutorial, we will explain how to create a simple ending screen in Unity, with a focus on implementing the ending screen in the event of a defeat condition.\n    <\/p>\n<h2>1. Installing Unity and Setting Up the Project<\/h2>\n<p>\n        After installing Unity, create a new 2D or 3D project. Once the basic structure of the game is set up, you need to create a dedicated scene for the ending screen. Here\u2019s how to create a new scene:\n    <\/p>\n<ul>\n<li>Select File \u2192 New Scene.<\/li>\n<li>Save the scene. For example, name it &#8220;EndingScreen&#8221;.<\/li>\n<\/ul>\n<h2>2. Adding Basic UI Elements<\/h2>\n<p>\n        To create the ending screen, you need to add user interface (UI) elements. You can use Unity&#8217;s UI system to add buttons, text, and image elements. Follow these steps:\n    <\/p>\n<ul>\n<li>Right-click in the Hierarchy window and select UI \u2192 Canvas to create a new canvas.<\/li>\n<li>Add UI \u2192 Panel inside the canvas to create a background.<\/li>\n<li>Add UI \u2192 Text within the Panel to display the &#8220;Game Over&#8221; message.<\/li>\n<li>Add UI \u2192 Button to create a &#8220;Restart&#8221; button.<\/li>\n<li>Adjust the properties of the Text and Button to change their style as desired.<\/li>\n<\/ul>\n<h3>2.1 Adjusting Text Properties<\/h3>\n<p>\n        Select the text element and enter an appropriate message in the Text property of the Inspector window. Modify font size, color, etc., to enhance readability.\n    <\/p>\n<h3>2.2 Adjusting Button Properties<\/h3>\n<p>\n        Set the button text to &#8220;Restart&#8221; and configure the button to call a specific method upon clicking. To do this, add the method to the On Click() event of the Button component.\n    <\/p>\n<h2>3. Setting Defeat Conditions<\/h2>\n<p>\n        You need to set defeat conditions in the game to create events that transition to the ending screen. For instance, you can configure it to transition to the ending screen when the player&#8217;s health reaches 0.\n    <\/p>\n<ul>\n<li>Implement health reduction logic in the Player script.<\/li>\n<li>When health reaches 0, call <code>SceneManager.LoadScene(\"EndingScreen\");<\/code> to transition to the ending screen.<\/li>\n<\/ul>\n<h2>4. Implementing the Ending Screen Script<\/h2>\n<p>\n        The ending screen script will be implemented to restart the game when the button is clicked. Below is an example of a script that manages the ending screen.\n    <\/p>\n<pre>\n        <code>\n        using UnityEngine;\n        using UnityEngine.SceneManagement;\n        using UnityEngine.UI;\n\n        public class EndingScreen : MonoBehaviour {\n            \/\/ Method called when the restart button is clicked\n            public void OnRestartButtonClicked() {\n                \/\/ Restart the game from the first scene\n                SceneManager.LoadScene(\"GameScene\");\n            }\n        }\n        <\/code>\n    <\/pre>\n<h2>5. Connecting Ending Screen UI and Script<\/h2>\n<p>\n        Now, you need to add the ending screen script to the ending screen canvas and connect the method to the button&#8217;s On Click() area.\n    <\/p>\n<ul>\n<li>Select the Panel or Canvas object.<\/li>\n<li>In the Inspector window, click &#8220;Add Component&#8221; and add the &#8220;EndingScreen&#8221; script.<\/li>\n<li>Select the Button object and drag the EndingScreen script into the On Click() event.<\/li>\n<li>Select the &#8220;OnRestartButtonClicked()&#8221; method from the dropdown menu.<\/li>\n<\/ul>\n<h2>6. Final Testing and Improvements<\/h2>\n<p>\n        Run the game to check if the ending screen works properly by inducing defeat conditions. Verify that the ending screen appears correctly and that it returns to the game scene when the button is clicked. If necessary, adjust the layout or style of the UI elements for improvements.\n    <\/p>\n<h3>6.1 Implementing Additional Features<\/h3>\n<p>\n        You can add various features to the ending screen besides statistics, scores, or the restart button. For example, consider adding:\n    <\/p>\n<ul>\n<li>Game timer display<\/li>\n<li>High score tracking<\/li>\n<li>Return to main menu button<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>\n        In this tutorial, we learned how to create an ending screen in Unity upon defeat. The ending screen leaves an important impression on players and serves to provide feedback on game play. We hope you can enhance the player experience by adding an ending screen to your game.\n    <\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In game development, the ending screen is an important element that wraps up the player experience. In this tutorial, we will explain how to create a simple ending screen in Unity, with a focus on implementing the ending screen in the event of a defeat condition. 1. Installing Unity and Setting Up the Project After &hellip; <a href=\"https:\/\/atmokpo.com\/w\/32111\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Unity Basics Course: Creating an Ending Screen (Defeat)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[135],"tags":[],"class_list":["post-32111","post","type-post","status-publish","format-standard","hentry","category-unity-basic"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/32111\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"In game development, the ending screen is an important element that wraps up the player experience. In this tutorial, we will explain how to create a simple ending screen in Unity, with a focus on implementing the ending screen in the event of a defeat condition. 1. Installing Unity and Setting Up the Project After &hellip; \ub354 \ubcf4\uae30 &quot;Unity Basics Course: Creating an Ending Screen (Defeat)&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/32111\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:05:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T11:33:15+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"Unity Basics Course: Creating an Ending Screen (Defeat)\",\"datePublished\":\"2024-11-01T09:05:45+00:00\",\"dateModified\":\"2024-11-01T11:33:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/\"},\"wordCount\":563,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"Unity Basic\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/\",\"url\":\"https:\/\/atmokpo.com\/w\/32111\/\",\"name\":\"Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:05:45+00:00\",\"dateModified\":\"2024-11-01T11:33:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/32111\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/32111\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unity Basics Course: Creating an Ending Screen (Defeat)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/32111\/","og_locale":"ko_KR","og_type":"article","og_title":"Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"In game development, the ending screen is an important element that wraps up the player experience. In this tutorial, we will explain how to create a simple ending screen in Unity, with a focus on implementing the ending screen in the event of a defeat condition. 1. Installing Unity and Setting Up the Project After &hellip; \ub354 \ubcf4\uae30 \"Unity Basics Course: Creating an Ending Screen (Defeat)\"","og_url":"https:\/\/atmokpo.com\/w\/32111\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:05:45+00:00","article_modified_time":"2024-11-01T11:33:15+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"3\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/32111\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/32111\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"Unity Basics Course: Creating an Ending Screen (Defeat)","datePublished":"2024-11-01T09:05:45+00:00","dateModified":"2024-11-01T11:33:15+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/32111\/"},"wordCount":563,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["Unity Basic"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/32111\/","url":"https:\/\/atmokpo.com\/w\/32111\/","name":"Unity Basics Course: Creating an Ending Screen (Defeat) - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:05:45+00:00","dateModified":"2024-11-01T11:33:15+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/32111\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/32111\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/32111\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"Unity Basics Course: Creating an Ending Screen (Defeat)"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=32111"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32111\/revisions"}],"predecessor-version":[{"id":32112,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32111\/revisions\/32112"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=32111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=32111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=32111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}