- Home /
Question by
hks_adohkd · Sep 25, 2018 at 06:58 PM ·
materialstextures
How to import mtl file and textures files in runtime?
I have an object that I want its material and textures be taken from 3 files that I download them in run time, the files are mtl file and 2 dds textures files. Now in my game every time a client presses a button I download these 3 files, and put them in the Resources folder, I use Resources.Load<Material>("uri to mtl file")
to load the materials but it always returns null! but when I stop the game from running the unity editor seems to do things behind the scene and when its done I run the game again to see the material and the textures are loaded successfully!
Now again downloading from the web is mandatory. so is there a way to import these material and textures in run time?
note:
-I am using unity 2017.3.1f1
Comment