{"id":5262,"date":"2020-07-07T17:58:18","date_gmt":"2020-07-07T14:58:18","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5262"},"modified":"2020-07-07T17:58:18","modified_gmt":"2020-07-07T14:58:18","slug":"find-out-which-script-disabled-or-enabled-this-gameobject","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2020\/07\/07\/find-out-which-script-disabled-or-enabled-this-gameobject\/","title":{"rendered":"Find out which script Disabled or Enabled this GameObject?"},"content":{"rendered":"\n<p>Small script to help tracking who disabled or enabled gameobject,<br><a href=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Helpers\/Debug\/WhoDisabledOrEnabled.cs\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Helpers\/Debug\/WhoDisabledOrEnabled.cs (opens in a new tab)\">https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Helpers\/Debug\/WhoDisabledOrEnabled.cs<\/a><\/p>\n\n\n\n<p><strong>Usage:<\/strong><br>&#8211; Add script to the gameobject you need to track<br>&#8211; press play<br>&#8211; see console for the error messages, select the error message row, and see stack trace for the calling script names and lines.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"169\" data-attachment-id=\"5263\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2020\/07\/07\/find-out-which-script-disabled-or-enabled-this-gameobject\/image-22\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?fit=634%2C169&amp;ssl=1\" data-orig-size=\"634,169\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?fit=634%2C169&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?resize=634%2C169&#038;ssl=1\" alt=\"\" class=\"wp-image-5263\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?w=634&amp;ssl=1 634w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?resize=300%2C80&amp;ssl=1 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Small script to help tracking who disabled or enabled gameobject,https:\/\/github.com\/UnityCommunity\/UnityLibrary\/blob\/master\/Assets\/Scripts\/Helpers\/Debug\/WhoDisabledOrEnabled.cs Usage:&#8211; Add script to the gameobject you need to track&#8211; press play&#8211; see console for the error messages, select the error message row, and see stack trace for the calling script names and lines.<\/p>\n","protected":false},"author":1,"featured_media":5263,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Find out which script Disabled or Enabled this GameObject? #unitytips","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[804],"tags":[738,1178,1179,189],"class_list":["post-5262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripts","tag-debug","tag-disabled","tag-enabled","tag-script"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2020\/07\/image.png?fit=634%2C169&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1mS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=5262"}],"version-history":[{"count":1,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5262\/revisions"}],"predecessor-version":[{"id":5264,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5262\/revisions\/5264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5263"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}