{"id":990,"date":"2026-02-12T22:58:07","date_gmt":"2026-02-12T22:58:07","guid":{"rendered":"https:\/\/sites.wsagames.com\/sz3c23\/?p=990"},"modified":"2026-05-11T20:57:11","modified_gmt":"2026-05-11T20:57:11","slug":"coding-development-ui","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/sz3c23\/coding-development-ui\/","title":{"rendered":"Coding Development: UI"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"990\" class=\"elementor elementor-990\">\n\t\t\t\t<div class=\"elementor-element elementor-element-46f973d e-flex e-con-boxed e-con e-parent\" data-id=\"46f973d\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4e9707c elementor-widget elementor-widget-text-editor\" data-id=\"4e9707c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div><strong>Here is the tutorial that helped me understand how to create multiple types of\u00a0 UI in the Unity engine:<\/strong><\/div><p><span style=\"text-decoration: underline\"><strong><a href=\"https:\/\/www.youtube.com\/watch?v=IuuKUaZQiSU\">Unity UI Tutorial | An introduction<\/a><\/strong><\/span><\/p><h4>Start Menu UI<\/h4><p data-start=\"50\" data-end=\"322\">The main menu UI consists of a title and three buttons: <strong data-start=\"162\" data-end=\"171\">Start<\/strong>, <strong data-start=\"173\" data-end=\"185\">Settings<\/strong>, and <strong data-start=\"191\" data-end=\"199\">Quit<\/strong>. I decided to prioritise functionality before visual polish, so I began by implementing the logic behind the Start button.<\/p><p data-start=\"50\" data-end=\"322\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1094\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505.png\" alt=\"\" width=\"2050\" height=\"1153\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505.png 2050w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505-300x169.png 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505-1024x576.png 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505-768x432.png 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505-1536x864.png 1536w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163505-2048x1152.png 2048w\" sizes=\"(max-width: 2050px) 100vw, 2050px\" \/> <img decoding=\"async\" class=\"alignnone size-full wp-image-1095\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163428.png\" alt=\"\" width=\"1391\" height=\"895\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163428.png 1391w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163428-300x193.png 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163428-1024x659.png 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5c4f\u5e55\u622a\u56fe-2026-02-15-163428-768x494.png 768w\" sizes=\"(max-width: 1391px) 100vw, 1391px\" \/><\/p><p data-start=\"324\" data-end=\"922\">To achieve this, I created a <code data-start=\"353\" data-end=\"370\">MainMenuManager<\/code> script and attached it to a GameObject in the start menu scene. In this script, I imported the SceneManagement library so that I could control scene transitions. Inside the class, I wrote a public method called <code data-start=\"581\" data-end=\"594\">StartGame()<\/code>. This method uses <code data-start=\"613\" data-end=\"639\">SceneManager.LoadScene()<\/code> to load the gameplay scene named \u201c2.5D test.\u201d I then connected this method to the Start button through the Button component\u2019s OnClick event in the Inspector. As a result, when the player clicks Start, the game transitions directly from the main menu scene into the gameplay scene.<\/p><p data-start=\"924\" data-end=\"1369\">I also structured two additional public methods for the other buttons. The <code data-start=\"999\" data-end=\"1015\">OpenSettings()<\/code> method currently uses <code data-start=\"1038\" data-end=\"1051\">Debug.Log()<\/code> to print \u201cSettings clicked\u201d in the Console, allowing me to confirm that the button interaction works correctly before building the actual settings panel. The <code data-start=\"1210\" data-end=\"1222\">QuitGame()<\/code> method calls <code data-start=\"1236\" data-end=\"1256\">Application.Quit()<\/code> to close the game in a built version, while also logging \u201cGame Quit\u201d in the Unity Editor for testing purposes.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-9e6bb9c e-flex e-con-boxed e-con e-parent\" data-id=\"9e6bb9c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-20de000 elementor-widget elementor-widget-video\" data-id=\"20de000\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;video_type&quot;:&quot;hosted&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"e-hosted-video elementor-wrapper elementor-open-inline\">\n\t\t\t\t\t<video class=\"elementor-video\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/StartMenu-test.mp4\" controls=\"\" preload=\"metadata\" controlsList=\"nodownload\"><\/video>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-148a0cc e-flex e-con-boxed e-con e-parent\" data-id=\"148a0cc\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d1eeccc elementor-widget elementor-widget-text-editor\" data-id=\"d1eeccc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u00a0<\/p><hr \/><h4>In-Game UI<\/h4><p data-start=\"133\" data-end=\"399\">In our game, there are three primary interactive UI icons:<strong> the Map, the Information Board, and the Notebook<\/strong>. All three belong to the same interaction category: expandable information panels. When the player clicks an icon, a detailed UI panel appears on the screen.<\/p><p data-start=\"133\" data-end=\"399\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1153\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350.jpg\" alt=\"\" width=\"1910\" height=\"1074\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350.jpg 1910w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350-1024x576.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225040_250_350-1536x864.jpg 1536w\" sizes=\"(max-width: 1910px) 100vw, 1910px\" \/><\/p><p data-start=\"133\" data-end=\"399\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1154\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350.jpg\" alt=\"\" width=\"1904\" height=\"1071\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350.jpg 1904w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350-1024x576.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/\u5fae\u4fe1\u56fe\u7247_20260227225042_251_350-1536x864.jpg 1536w\" sizes=\"(max-width: 1904px) 100vw, 1904px\" \/><\/p><p data-start=\"133\" data-end=\"399\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1155\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456.jpg\" alt=\"\" width=\"1901\" height=\"1070\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456.jpg 1901w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456-1024x576.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/0ca117190c393a89ff056eac85306456-1536x865.jpg 1536w\" sizes=\"(max-width: 1901px) 100vw, 1901px\" \/><\/p><p data-start=\"401\" data-end=\"954\">In the first iteration, I implemented a simple <strong>toggle (Clicking the icon once opens the corresponding detail panel, and clicking it again closes it).<\/strong>\u00a0From a development perspective, this approach was straightforward and clean. However, <strong>during our first playtest<\/strong>, I realised that this interaction <strong>did not align with players\u2019 intuition<\/strong>. Most players instinctively clicked<strong>\u00a0anywhere outside the panel to close it<\/strong>, rather than clicking the same icon again. The toggle logic created a small but noticeable friction in usability.<\/p><p data-start=\"956\" data-end=\"1520\">To address this, I redesigned the UI interaction at a structural level. I added a <strong>full-screen background button at the bottom layer<\/strong> of the UI hierarchy. This background button covers the entire game view whenever a detail panel is opened. As a result, any click outside the active panel is captured by this background layer and immediately closes the current UI. This small change significantly improved the fluency of the interaction, aligning the system with <strong>common UX patterns<\/strong> players are already familiar with.<\/p><p data-start=\"956\" data-end=\"1520\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1157\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540.jpg\" alt=\"\" width=\"1863\" height=\"1047\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540.jpg 1863w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540-1024x575.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/b7e9a7e359a80e4d6ada4af7c2c09540-1536x863.jpg 1536w\" sizes=\"(max-width: 1863px) 100vw, 1863px\" \/><\/p><p data-start=\"956\" data-end=\"1520\">The script that I attached to all the <strong>In-geme UI buttons on click<\/strong> and the <strong>Background button on click<\/strong> holds a reference to a single UI GameObject called <code data-start=\"138\" data-end=\"144\">Info<\/code>, which represents the detail view. When the player clicks the relevant UI icon, <code data-start=\"225\" data-end=\"241\">ToggleDetail()<\/code> is called <strong>to show the panel<\/strong> by setting <code data-start=\"281\" data-end=\"303\">Info.SetActive(true)<\/code>. After the panel is open, the <code data-start=\"334\" data-end=\"344\">Update()<\/code> loop listens for a left mouse click (<code data-start=\"382\" data-end=\"411\">Input.GetMouseButtonDown(0)<\/code>); if the panel is currently active (<code data-start=\"448\" data-end=\"465\">Info.activeSelf<\/code>), the script immediately calls <code data-start=\"497\" data-end=\"510\">CloseInfo()<\/code> <strong>to hide<\/strong> it via <code data-start=\"526\" data-end=\"549\">Info.SetActive(false)<\/code>. In practice, this creates a simple \u201copen on icon click, close on any click\u201d behaviour, which matches the common player expectation of dismissing a UI overlay by clicking anywhere on the screen.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8292561 e-flex e-con-boxed e-con e-parent\" data-id=\"8292561\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-51f5c8c elementor-widget elementor-widget-video\" data-id=\"51f5c8c\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;video_type&quot;:&quot;hosted&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"e-hosted-video elementor-wrapper elementor-open-inline\">\n\t\t\t\t\t<video class=\"elementor-video\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/Ingame-UI.mp4\" controls=\"\" preload=\"metadata\" controlsList=\"nodownload\"><\/video>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5fd0802 e-flex e-con-boxed e-con e-parent\" data-id=\"5fd0802\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ce8d336 elementor-widget elementor-widget-text-editor\" data-id=\"ce8d336\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u00a0<\/p><hr \/><h4>Dynamic Notebook UI<\/h4><p data-start=\"211\" data-end=\"579\">For the Notebook system, I wanted to create a sense of progression tied directly to gameplay. When the player first clicks the Notebook UI, it opens to a <strong>blank interface page<\/strong>. The player will collect the items to make the peacock appear, then solve the puzzle for the peacock to earn its trust. Player will be able to collect &#8220;SoulFragment&#8221;, which unlocks the peacock information page include a fabulous illustration of a peacock. After that, when the player clicks the Notebook UI, it will appears peacock information page instead of a blank page.<\/p><p data-start=\"211\" data-end=\"579\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1159\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50.jpg\" alt=\"\" width=\"1902\" height=\"1070\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50.jpg 1902w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50-1024x576.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/412e5b5c04198b3ec47eb01bc6331f50-1536x864.jpg 1536w\" sizes=\"(max-width: 1902px) 100vw, 1902px\" \/><\/p><p data-start=\"211\" data-end=\"579\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1160\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7.jpg\" alt=\"\" width=\"1895\" height=\"1066\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7.jpg 1895w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7-300x169.jpg 300w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7-1024x576.jpg 1024w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7-768x432.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/050acad489e7e9fc63cfce9762d208b7-1536x864.jpg 1536w\" sizes=\"(max-width: 1895px) 100vw, 1895px\" \/><\/p><p data-start=\"211\" data-end=\"579\"><span style=\"text-decoration: underline\"><strong>Loop will be:<\/strong><\/span><\/p><p data-start=\"211\" data-end=\"579\"><strong>Click Notebook UI appears blank page -&gt; Collect Soulfragment to unlock peacock info page -&gt; Click Notebook UI appears peacock info page<\/strong><\/p><p data-start=\"211\" data-end=\"579\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1165\" src=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a.jpg\" alt=\"\" width=\"1280\" height=\"1919\" srcset=\"https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a.jpg 1280w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a-200x300.jpg 200w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a-683x1024.jpg 683w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a-768x1151.jpg 768w, https:\/\/sites.wsagames.com\/sz3c23\/wp-content\/uploads\/sites\/68\/2026\/02\/ae1471831a27f2ff2793d97e8298b31a-1025x1536.jpg 1025w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p><p data-start=\"581\" data-end=\"1156\">The core logic is handled inside the <code data-start=\"618\" data-end=\"628\">Notebook<\/code> script. When <code data-start=\"642\" data-end=\"663\">OnNotebookClicked()<\/code> is triggered, the system first checks whether the book is already open to prevent repeated activation. Once opened, the script evaluates a boolean variable called <code data-start=\"827\" data-end=\"844\">peacockUnlocked<\/code>. If the player <strong>has not yet collected<\/strong> the Soul Fragment from the peacock, the notebook <strong>displays the default<\/strong> <code data-start=\"952\" data-end=\"967\">interfacePage<\/code>, which acts as an empty placeholder. However, after the player <strong>presses X to collect the Soul Fragment<\/strong>, this sets <code data-start=\"1085\" data-end=\"1102\">peacockUnlocked<\/code> to <code data-start=\"1106\" data-end=\"1112\">true<\/code>, permanently updating the notebook\u2019s state.<\/p><p data-start=\"1158\" data-end=\"1463\">From that point forward, opening the notebook triggers <code data-start=\"1213\" data-end=\"1228\">ShowPeacock()<\/code> instead of <code data-start=\"1240\" data-end=\"1257\">ShowInterface()<\/code>, <strong>deactivating the blank page and activating the dedicated peacock page<\/strong>. This creates a dynamic page-replacement system driven entirely by progression flags rather than separate UI prefabs or scene reloads.<\/p><p data-start=\"1465\" data-end=\"2038\">To maintain intuitive UX behaviour, I implemented a full-screen background button that calls <code data-start=\"1557\" data-end=\"1580\">OnBackgroundClicked()<\/code>. If the notebook is open, it closes all pages through <code data-start=\"1635\" data-end=\"1652\">CloseAllPages()<\/code> and resets the <code data-start=\"1668\" data-end=\"1678\">bookOpen<\/code> state. Importantly, closing the notebook does not reset the unlock condition. This means that after the player collects the Soul Fragment and closes the page, reopening the Notebook UI will directly display the Peacock entry instead of the blank interface.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Here is the tutorial that helped me understand how to create multiple types of\u00a0 UI in the Unity engine: Unity UI Tutorial | An introduction Start Menu UI The main menu UI consists of a title and three buttons: Start, Settings, and Quit. I decided to prioritise functionality before visual polish, so I began by [&hellip;]<\/p>\n","protected":false},"author":59,"featured_media":1092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/posts\/990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/comments?post=990"}],"version-history":[{"count":19,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/posts\/990\/revisions"}],"predecessor-version":[{"id":1546,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/posts\/990\/revisions\/1546"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/media\/1092"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/media?parent=990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/categories?post=990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/sz3c23\/wp-json\/wp\/v2\/tags?post=990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}