{"id":2056,"date":"2018-07-17T16:19:18","date_gmt":"2018-07-17T16:19:18","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2056"},"modified":"2018-07-17T16:20:10","modified_gmt":"2018-07-17T16:20:10","slug":"unity-3d-changing-color-on-object-changes-color-on-all-other-object-in-scene","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/unity-3d-changing-color-on-object-changes-color-on-all-other-object-in-scene\/","title":{"rendered":"Unity 3D &#8211; Changing color on game object changes color on other objects in scene"},"content":{"rendered":"<p>Problem: When changing the shader color on a game object, the color on other game objects changes.<\/p>\n<p>Reason: This happens because the other game objects are using the same Mesh Renderer as the game object your modifying.\u00a0 So when your changing the shader, your actually modifying the Mesh Renderer, not the game object.<\/p>\n<p>Fix: Change the Mesh Renderer for the game object.<\/p>\n<p>In the example picture below, when you change the color on the cube (highlighted red) the color on the capsule changes, because they both are using the same Mesh Renderer (highlighted green).\u00a0 To fix, change either the Cube or Capsule to a different Mesh Renderer (highlighted green)<\/p>\n<p><a href=\"http:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2058\" src=\"http:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object-1024x555.png\" alt=\"\" width=\"584\" height=\"317\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object-1024x555.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object-300x163.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object-768x416.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object-500x271.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2018\/07\/Unity-Demo-Changing-color-on-object.png 1920w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: When changing the shader color on a game object, the color on other game objects changes. Reason: This happens because the other game objects are using the same Mesh Renderer as the game object your modifying.\u00a0 So when your &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/unity-3d-changing-color-on-object-changes-color-on-all-other-object-in-scene\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[325],"tags":[487,403,486,326,327],"class_list":["post-2056","post","type-post","status-publish","format-standard","hentry","category-unity3d","tag-color","tag-development","tag-game","tag-unity","tag-unity3d"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2056"}],"version-history":[{"count":4,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2056\/revisions"}],"predecessor-version":[{"id":2061,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2056\/revisions\/2061"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}