{"id":96,"date":"2020-06-05T01:49:10","date_gmt":"2020-06-05T01:49:10","guid":{"rendered":"https:\/\/lucyestela.com\/dev\/?p=96"},"modified":"2021-03-02T03:00:58","modified_gmt":"2021-03-02T03:00:58","slug":"monobehaviour","status":"publish","type":"post","link":"https:\/\/lucyestela.com\/dev\/unity\/monobehaviour\/","title":{"rendered":"Monobehaviour &#8211; Unity"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\">So I was watching a tutorial and the guys keeps banging on about classes being monobehaviour or not and I started wondering why he was making note of one that wasn&#8217;t monobehaviour. So I&#8217;ve looked it up on Unity and you can see the whole post <a href=\"https:\/\/docs.unity3d.com\/530\/Documentation\/ScriptReference\/MonoBehaviour.html#:~:text=MonoBehaviour%20is%20the%20base%20class,must%20explicitly%20derive%20from%20MonoBehaviour.&amp;text=Note%3A%20There%20is%20a%20checkbox,()%20from%20executing%20when%20unticked.\">here<\/a>, but the main jist is this.<\/p>\n<p class=\"\">MonoBehaviour is the base class from which every Unity script derives.<\/p>\n<div class=\"subsection\">\n<p class=\"\">When you use C#, you must explicitly derive from MonoBehaviour. When you use UnityScript (a type of JavaScript), you do not have to explicitly derive from MonoBehaviour.<\/p>\n<p><strong>Note:<\/strong>&nbsp;There is a checkbox for disabling MonoBehaviour on the Unity Editor; it disables&nbsp;<code class=\"mono\">Start()<\/code>,&nbsp;<code class=\"mono\">Awake()<\/code>,&nbsp;<code class=\"mono\">Update()<\/code>,&nbsp;<code class=\"mono\">FixedUpdate()<\/code>, and&nbsp;<code class=\"mono\">OnGUI()<\/code>&nbsp;from executing when unticked. If none of these functions are present in the script, the Editor does not display the checkbox.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>So I was watching a tutorial and the guys keeps banging on about classes being monobehaviour or not and I started wondering why he was making note of one that wasn&#8217;t monobehaviour. So I&#8217;ve looked it up on Unity and you can see the whole post here, but the main jist is this. MonoBehaviour is &#8230; <a title=\"Monobehaviour &#8211; Unity\" class=\"read-more\" href=\"https:\/\/lucyestela.com\/dev\/unity\/monobehaviour\/\" aria-label=\"More on Monobehaviour &#8211; Unity\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[58],"tags":[42,41,4],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-unity","tag-classes","tag-monobehaviour","tag-unity"],"_links":{"self":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":3,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":239,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/96\/revisions\/239"}],"wp:attachment":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}