{"id":1563,"date":"2019-11-25T21:21:39","date_gmt":"2019-11-25T21:21:39","guid":{"rendered":"https:\/\/docs.sisus.co\/power-inspector\/?p=1563"},"modified":"2021-03-24T17:48:29","modified_gmt":"2021-03-24T17:48:29","slug":"helpbox","status":"publish","type":"post","link":"https:\/\/docs.sisus.co\/power-inspector\/attributes\/helpbox\/","title":{"rendered":"HelpBox"},"content":{"rendered":"<p>When added before a class member causes a help box to be shown above the control of the class member it in the inspector.<\/p>\n<p>It is also possible to only show the help box when a specified predicate is true.<\/p>\n<h2>Attribute Target<\/h2>\n<p>Field, property, method or indexer.<\/p>\n<h2>Example<\/h2>\n<pre>using UnityEngine;\r\nusing Sisus.Attributes;\r\n\r\npublic class HelpPuzzleBox : MonoBehaviour\r\n{\r\n\t[ShowInInspector, HelpBox(\"Can you make all help boxes disappear?\", \"!a &amp;&amp; !e\", HelpBoxMessageType.Warning)]\r\n\tprivate bool a;\r\n\t[ShowInInspector, HelpBox(\"Can you make all help boxes disappear?\", \"a &amp;&amp; !b &amp;&amp; !e\", HelpBoxMessageType.Warning)]\r\n\tprivate bool b;\r\n\t[ShowInInspector, HelpBox(\"Can you make all help boxes disappear?\", \"b &amp;&amp; !c &amp;&amp; !e\", HelpBoxMessageType.Warning)]\r\n\tprivate bool c;\r\n\t[ShowInInspector, HelpBox(\"Can you make all help boxes disappear?\", \"c &amp;&amp; !d &amp;&amp; !e\", HelpBoxMessageType.Warning)]\r\n\tprivate bool d;\r\n\t[ShowInInspector, HelpBox(\"Can you make all help boxes disappear?\", \"d &amp;&amp; !e\", HelpBoxMessageType.Warning)]\r\n\tprivate bool e;\r\n}<\/pre>\n<h2>Example Result<\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1564\" src=\"https:\/\/docs.sisus.co\/power-inspector\/wp-content\/uploads\/2019\/11\/inspector-helpbox-attribute.png\" alt=\"\" width=\"298\" height=\"245\" srcset=\"https:\/\/docs.sisus.co\/power-inspector\/wp-content\/uploads\/sites\/2\/2019\/11\/inspector-helpbox-attribute.png 298w, https:\/\/docs.sisus.co\/power-inspector\/wp-content\/uploads\/sites\/2\/2019\/11\/inspector-helpbox-attribute-220x180.png 220w\" sizes=\"(max-width: 298px) 100vw, 298px\" \/>\u00a0 \u00a0<img loading=\"lazy\" class=\"alignnone size-full wp-image-1565\" src=\"https:\/\/docs.sisus.co\/power-inspector\/wp-content\/uploads\/2019\/11\/inspector-helpbox-attribute-hidden.png\" alt=\"\" width=\"298\" height=\"116\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When added before a class member causes a help box to be shown above the control of the class member it in the inspector. It is also possible to only show the help box when a specified predicate is true. Attribute Target Field, property, method or indexer. Example using UnityEngine; using Sisus.Attributes; public class HelpPuzzleBox ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/docs.sisus.co\/power-inspector\/attributes\/helpbox\/\" title=\"read more\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1563"}],"collection":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/comments?post=1563"}],"version-history":[{"count":2,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1563\/revisions"}],"predecessor-version":[{"id":1830,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1563\/revisions\/1830"}],"wp:attachment":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/media?parent=1563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/categories?post=1563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/tags?post=1563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}