{"id":3805,"date":"2016-09-02T20:29:36","date_gmt":"2016-09-02T20:29:36","guid":{"rendered":"http:\/\/www.drmop.com\/?p=3805"},"modified":"2016-09-02T20:29:36","modified_gmt":"2016-09-02T20:29:36","slug":"hiding-ui-elements-in-unity","status":"publish","type":"post","link":"http:\/\/www.drmop.com\/index.php\/2016\/09\/02\/hiding-ui-elements-in-unity\/","title":{"rendered":"Hiding UI elements in Unity!"},"content":{"rendered":"<p>Ok, so recently I tried to find a way to hide UI elements in Unity 5, looked far and wide and apparently its not possible to do something like element.visble = false. So, the easiest solution I found was to set the game objects localScale to 0, e.g:<\/p>\n<p>transform.localScale = new Vector3(0, 0, 0);<\/p>\n<p>And to make visible again use<\/p>\n<p>transform.localScale = new Vector3(1.0f, 1.0f, 1.0f); \u00a0 \u00a0\/\/ Or whatever original scale the object had<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, so recently I tried to find a way to hide UI elements in Unity 5, looked far and wide and apparently its not possible to do something like element.visble = false. So, the easiest solution I found was to set the game objects localScale to 0, e.g: transform.localScale = new Vector3(0, 0, 0); And [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[181],"tags":[621],"class_list":["post-3805","post","type-post","status-publish","format-standard","hentry","category-iwgame-engine","tag-unity-5-hide-ui-elements-images-buttons"],"_links":{"self":[{"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/posts\/3805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/comments?post=3805"}],"version-history":[{"count":1,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/posts\/3805\/revisions"}],"predecessor-version":[{"id":3806,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/posts\/3805\/revisions\/3806"}],"wp:attachment":[{"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/media?parent=3805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/categories?post=3805"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.drmop.com\/index.php\/wp-json\/wp\/v2\/tags?post=3805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}