Quantcast
Channel: Answers for "Query renderer.materials in prefabs in Editor without changing to instance"
Browsing latest articles
Browse All 4 View Live

Answer by troien

Whenever you call Renderer.[material][1] or renderer.[materials][2], unity will create copy's of the Renderer's material(s) and return these copy's instead. And when you set it, it will clone the...

View Article



Answer by JosueMariscal

Loop through the materials. This will print them out... Renderer rend = go.GetComponent(); foreach (Material mat in rend.sharedMaterials) { Debug.Log(mat); }

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images