really noob question about applying texture

textures are projected in y-direction. how do i apply texture on vertical surface? not on an imported object with UVs, but on an unity object, cube for example?

You would have to assign the cube’s UV map yourself. Take a look at the Scripting API and User Manual for the Mesh class.