0
\$\begingroup\$

What are the difference between Renderer.sharedMaterial and Renderer.sharedMaterials in Unity?

\$\endgroup\$
2
\$\begingroup\$

Renderer.sharedMaterial returns first material used by a Renderer or null if Renderer has no materials. If there`re multiple materials, first one in that array will be returned.

Renderer.sharedMaterials returns all (1, 2, ...) materials used by a Renderer as array or null if Renderer has no materials.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.