Using GetComponent<>() : Replace Material (video)

Hi.
Just to experiment, I decided to see how replace the initial material with another one. I used a Serialized variable to store the second one.

The slightly different code:

20220624-replace-material-code

Iā€™m sure there is a cleaner way to do this, as the MeshRenderer component seems to be able to store multiple materials :thinking: But, for now, my DIY works :grin:

1 Like

Wrong section post, not Blender stuff. You can edit the post to the right place.

1 Like

My bad, sorry for the mistake :grimacing:

2 Likes

Privacy & Terms