I’m applying the same texture to two planes. One was created in Unity3D and the other in blender. The texture applied to the plane create with Unity3D is streched, which is the effect I need, but the other one, I can only see a small section of the image. Should there be a different code for each of the planes (what is missing) or do I need to change something in the inspector of the plane made with Blender?
Here’s how I’m applying the texture:
Texture2D tex;
byte[ ] ytes;
ytes=System.IO.File.ReadAllBytes(genInfo.imgLocal);
tex=new Texture2D(1,1);
tex.LoadImage(ytes);
planeObject.renderer.material.mainTexture=tex; //Works !!!
mainObject.renderer.material.mainTexture = tex; //Doesn’t work
My thanks in advanced