Check out example codes for "unity main texture not working". It will help you in understanding the concepts better.

Code Example 1

//Get object renderer
rend = GetComponent<MeshRenderer>();

//deprecated do not use
rend.material.maintexture = newTexture;

//proper method
rend.material.SetTexture("_BaseMap",newTexture);

Learn ReactJs, React Native from akashmittal.com