Hi All!
I am working on some editor utility and I’ve encountered serious problem. It seems to be easy thing, cause in 3D packages this may be solved quite easily via Python, MaxScript, LScript etc., but i can’t find any solution in unity. This is my problem:
I have full paths to the .OBJ file and to the textures stored inside variables in my script (i am reading those from the text file). For example, in MyGeo variable i have string “C:\TEMP\My_Project\Sphere.obj”, in MyTexture_Diffuse i have string “C:\TEMP\My_Project\Sphere_Diffuse.png”, in MyTexture_Normal i have string “C:\TEMP\My_Project\Sphere_Normal.png”
What i need is to load .OBJ file from MyGeo variable to the scene (and to show it in editor’s viewport if possible), then assign needed shader to this loaded OBJ and to load textures from the variables into texture inputs of the shader.
How all this may be done in unity script? I will be very grateful for any help with this, thanks in advance!