Grab Image/texture from MTL file and apply to a game object

Hello,

I have an obj and mtl file. When I add both files to my project, I am able to drag the obj in as a game object. I believe that the mtl also applies to the obj because the obj will come with a certain color if the mtl file specifies it. How can I get an image that is contained as a link within the mtl file applied to the obj game object?

Here is what is contained inside the mtl file:


newmtl body1
	Ns 10.0000
	Ni 1.5000
	d 1.0000
	Tr 0.0000
	Tf 1.0000 1.0000 1.0000 
	illum 2
	Ka 0.5000 0.5000 0.5000
	Kd 1.000 1.000 1.000
	Ks 0.0000 0.0000 0.0000
	Ke 0.0000 0.0000 0.0000
	map_Kd  -o 0 -22.843 0 -s 20.26 22.843 1 https://machinecore.farmcp.com/Ziing3Server/Ziing3.aspx?req=image&maharam&fmt=jpg&qlty=80&mat=466194-005&raw=true&dpi=100

The link at the end is what is the image is. If I were to copy and paste this into a browser, it would download the image. I’m wondering if there’s a way to grab this image and apply it to a game object (ideally its corresponding obj). Any help or guidance is appreciated.


Thank you

Check this : Unity - Scripting API: WWW.LoadImageIntoTexture
You will need to manually extract the url from the mtl file yourself tho.