{"id":1913,"date":"2022-08-03T18:44:23","date_gmt":"2022-08-03T18:44:23","guid":{"rendered":"https:\/\/golemitegames.com\/?post_type=docs&#038;p=1913"},"modified":"2022-08-03T19:07:56","modified_gmt":"2022-08-03T19:07:56","password":"","slug":"gridobjectoptions","status":"publish","type":"docs","link":"https:\/\/golemitegames.com\/index.php\/docs\/gridobjectoptions\/","title":{"rendered":"GridObjectOptions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" style=\"font-size:22px\">public void Move()<\/h2>\n\n\n\n<p>After using the <strong>ObjectSelector<\/strong> to select an object, this function then sets up unblocking the cells of that object and also basically resetting it to be placed again. <\/p>\n\n\n\n<p>If you call this from another script, just be sure to set this class&#8217;s <strong>SelectedObj<\/strong> variable. The <strong>SelectedObj<\/strong> will also need to have the <strong>GridObject<\/strong> class on it to replace it. <\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-csharp\" data-lang=\"C#\"><code>public GridObjectOptions gridObjectOptions;\npublic Button btn;\npublic GameObject objectToMove;\n\nvoid Start() \n{\n    btn.onClick.AddListener(() =&gt; \n    {\n         gridObjectOptions.SelectedObj = objectToMove;\n         gridObjectOptions.Move();\n    });\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px\">public void OpenMenu(Vector3 pos, GameObject obj)<\/h2>\n\n\n\n<p>Opens the menu assigned in the inspector slot for <strong>Menu Canvas<\/strong>. It opens the menu at <strong>pos<\/strong> at the <strong>obj<\/strong> height plus <strong>Menu Hover<\/strong> set in the inspector. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px\">public void CloseMenu()<\/h2>\n\n\n\n<p>Sets the active menu&#8217;s visibilty to false. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>public void Move() After using the ObjectSelector to select an object, this function then sets up unblocking the cells of that object and also basically resetting it to be placed again. If you call this from another script, just be sure to set this class&#8217;s SelectedObj variable. The SelectedObj will also need to have the [&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":[45],"doc_tag":[],"class_list":["post-1913","docs","type-docs","status-publish","hentry","doc_category-scripting-gridbuilder2"],"acf":[],"aioseo_notices":[],"year_month":"2026-04","word_count":127,"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":"Scripting","term_url":"https:\/\/golemitegames.com\/index.php\/docs-category\/scripting-gridbuilder2\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1913","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=1913"}],"version-history":[{"count":4,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1913\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/1913\/revisions\/1921"}],"wp:attachment":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/media?parent=1913"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_category?post=1913"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=1913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}