{"id":2441,"date":"2025-11-19T19:29:03","date_gmt":"2025-11-19T19:29:03","guid":{"rendered":"https:\/\/golemitegames.com\/?post_type=docs&#038;p=2441"},"modified":"2025-11-21T21:27:59","modified_gmt":"2025-11-21T21:27:59","password":"","slug":"popup","status":"publish","type":"docs","link":"https:\/\/golemitegames.com\/index.php\/docs\/popup\/","title":{"rendered":"Popup"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Introduction<\/h2>\n\n\n\n<p>Displays <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount<\/a> information and animates the Popup upwards and fades it out. This information is given from a <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/popup-spawner\/\" title=\"Popup Spawner\">PopupSpawner<\/a> or <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/fps-popup-spawner\/\" title=\"FPS Popup Spawner\">FPSPopupSpawner<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting up<\/h2>\n\n\n\n<p>There is a prefab Popup located in \/prefabs\/UI.<br><br>Setting up without the prefab is easy and only requires an Image and TextMeshProUGUI component. The other settings are given by a <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/popup-spawner\/\" title=\"Popup Spawner\">PopupSpawner<\/a>.<br><br>Popups parent directly under a transform created at runtime by the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/resource-and-production-manager\/\" title=\"Resource And Production Manager\">Resource And Production Manager<\/a> for tidyness and for when the originating object gets destroyed, the popup does not go with it and has its own lifetime. <br><br>This component should be assigned to the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/popup-spawner\/\" title=\"Popup Spawner\">PopupSpawner<\/a> or <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/fps-popup-spawner\/\" title=\"FPS Popup Spawner\">FPSPopupSpawner<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Settings<\/h2>\n\n\n\n<p><strong>Icon<\/strong><br>Assign an Image component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount&#8217;s<\/a> <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item<\/a> Icon. <br><br><strong>Text<\/strong><br>Assign a TextMeshProUGUI component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount<\/a>.Amount.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Scripting <\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-csharp\" data-lang=\"C#\" data-show-lang=\"0\"><code>\/\/\/ &lt;summary&gt;\n\/\/\/ Create a popup with the Icon from ItemAmount.Item.Icon and the amount from ItemAmount.Amount\n\/\/\/ &lt;\/summary&gt;\n\/\/\/ &lt;param name=&quot;itemAmount&quot;&gt;The ItemAmount to take the information from&lt;\/param&gt;\n\/\/\/ &lt;param name=&quot;added&quot;&gt;Whether ItemAmount Amount is being added or removed&lt;\/param&gt;\npublic void InitPopup(ItemAmount itemAmount, bool added)\n\n\/\/\/ &lt;summary&gt;\n\/\/\/ Manually animate the popup move upwards\n\/\/\/ &lt;\/summary&gt;\n\/\/\/ &lt;param name=&quot;riseVector&quot;&gt;The Vector3 direction to move the popup&lt;\/param&gt;\n\/\/\/ &lt;param name=&quot;duration&quot;&gt;How long it should take to move it&lt;\/param&gt;\n\/\/\/ &lt;param name=&quot;curve&quot;&gt;The desired movement and fade curve&lt;\/param&gt;\npublic void AnimatePopup(Vector3 riseVector, float duration, AnimationCurve curve)<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Displays ItemAmount information and animates the Popup upwards and fades it out. This information is given from a PopupSpawner or FPSPopupSpawner. Setting up There is a prefab Popup located in \/prefabs\/UI. Setting up without the prefab is easy and only requires an Image and TextMeshProUGUI component. The other settings are given by a PopupSpawner. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"doc_category":[46],"doc_tag":[],"class_list":["post-2441","docs","type-docs","status-publish","hentry","doc_category-resource-and-production"],"acf":[],"aioseo_notices":[],"year_month":"2026-04","word_count":260,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"rickitz5h","author_nicename":"rickitz5h","author_url":"https:\/\/golemitegames.com\/index.php\/author\/rickitz5h\/"},"doc_category_info":[{"term_name":"Resource And Production","term_url":"https:\/\/golemitegames.com\/index.php\/docs-category\/resource-and-production\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/comments?post=2441"}],"version-history":[{"count":5,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2441\/revisions"}],"predecessor-version":[{"id":2573,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2441\/revisions\/2573"}],"wp:attachment":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/media?parent=2441"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_category?post=2441"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=2441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}