Get a texture from a material on a GameObject
The Game Object that the material is applied to.
The index of the material.
The texture to get. See Unity Shader docs.
Store the texture in a variable.
Get From Shared Material
Get the shared version of the texture.