How to get material from Gameobject at runtime?

Same as title

Original Post on Discord

by user 103054507105067008

Get the Renderer component and use the sharedMaterials array

Thanks!

by user 103054507105067008

What I did with it :slightly_smiling_face: animated UVs at runtime
AnimateUV.ts

by user 103054507105067008