Objects are upside down and backwards

Here is my code. For some reason all the cubes face backwards and upside down.
But when I check them out on the scene view they all face properly x to the right, Z back and Y up.

#region Wall List
squareList = new GameObject();
squareList.name = “Squares List”;

_editorButtonNames[0,0] holds the “PNG/nameoftheimage” in it.

if( SquareObj == null )
SquareObj = GameObject.CreatePrimitive( PrimitiveType.Cube );
SquareObj.name = “Square”;
SquareObj.tag = “Square”;
SquareObj.renderer.material = Resources.Load( _editorButtonNames[0,0], typeof(Material)) as Material;
SquareObj.renderer.material.shader = Shader.Find( “Diffuse” );
SquareObj.transform.localScale = new Vector3( squareSize, 0.1f, squareSize );


int nameCounter = 0;

// load the array with the squares
for ( x = 0; x < _MazeWidth; x++ )
for ( z = 0; z < _MazeHeight; z++)
// Drawing the Floor:
tempPosition = new Vector3( x * squareSize, 0, z * squareSize);
tempObject = (GameObject)Instantiate( SquareObj,tempPosition, Quaternion.identity );
tempObject.name = tempObject.tag + nameCounter++;
// making a folder to store them all in, keeps it neat
squareList.transform.position = new Vector3( 0, 0, 0);
tempObject.transform.parent = squareList.transform;
// since unity draws from the centre of the object we move the x,y of the object
// back by half the size of the object and up by half the size of the object.
_squarePos[x,z] = new Rect( tempObject.transform.position.x - squareSize / 2, tempObject.transform.position.z + squareSize / 2, squareSize, squareSize);

//SquareObj = null; // emptying the previous use of this object

So I made a 2 dimension array to hold the position of the objects.
So I can check what object the raycast hits when I hit them.

That is not the problem. The images are all backwards and upside down.

I set the man camera to rotation of 90,0,0.

So why are they like that.

thanks all

Hi, thanks for the eply.

First: its a simple 2d texture done in photoshop 512x512 pixel. Put onto a material.

Second: How do you set it up for local or global. Should they not all look at a object the same way?