I want to create a primitive and apply a pict.jpg that I have dragged into the assets folder. All the examples I’ve seen want you to do
myprimitive.renderer.material.mainTexture=Resources.Load(“pict”);//this works.
According to the docs though you can assign a texture like this
var texture : Texture;
renderer.material.mainTexture = texture;
When I load a jpg into assets it looks like it’s a texture in the inspector, but
renderer.material.mainTexture=“pict”; //does not work
Does resources load have to be used to apply a texture?
Thanks,
Dan