rotating the object in the correct orientation

Hi im wondering how to get my objects rotation right

I was using my preview objects rotation but if were to rotate it I would have to use quaternion euler

but when i use it this happens: 1

the object is rotated in the wrong orientation no matter what I do

My script
public void ChangeCurrentsBuilding()

    {
        //GameObject curprev = Instantiate(currentobject.preview, currentpos, currentobject.preview.transform.rotation) as GameObject;
        GameObject curprev = Instantiate(currentobject.preview, currentpos, Quaternion.Euler(currentRot)) as GameObject;
        currentpreview = curprev.transform;
    }

    public void startPreview()


    {

        if (Physics.Raycast(cam.position, cam.forward, out hit, 50, layer)) {

            if (hit.transform != this.transform) {


                showPreview(hit);

            }

        }

    }

    public void showPreview(RaycastHit hit2) {

        currentpos = hit2.point;
        currentpos -= Vector3.one * offset;
        currentpos /= gridSize;
        currentpos = new Vector3(Mathf.Round(currentpos.x), Mathf.Round(currentpos.y), Mathf.Round(currentpos.z));
        currentpos *= gridSize;
        currentpos += Vector3.one * offset;
        currentpreview.position = currentpos;
        if (Input.GetButtonDown("Fire2")) {

            currentRot += new Vector3(0, 90, 0);

            currentpreview.localEulerAngles = currentRot;

        }

    }




    public void Build()
    {
        PreviewObject PO = currentpreview.GetComponent<PreviewObject>();
        if(PO.isBuildable)
        {

            Instantiate(currentobject.prefab, currentpos, Quaternion.Euler(currentRot));


        }


}
}

[System.Serializable]


public class buildObjects {

    public string name;
    public GameObject preview;
    public GameObject prefab;
    public int gold;

}

currentpreview.localEulerAngles = currentRot;

This line will affect the rotation of the object, but only relative to it’s parent. If the parent-object is rotated about say… the X axis, then adjusting the child’s localRotation about the Y axis, will NOT change the object’s rotation around the X axis.
However, if you were to modify the object’s world-space “rotation”

currentpreview.rotation = Quaternion.Euler(currentRot);

This will set the orientation relative to the WORLD (as opposed to relative to the parent).

I mention this because in the images it looks like the “correct” version is rotated about the X (or Z) axis, but the “incorrect” one is not. So, you either need a parent object that is roatated about X, OR, you need to specify that rotation in your initial Euler angle (initial, meaning: don’t add it again everytime you rotate!).