Make the text alignment to be on left

Hi, I am new at Unity and I am trying to have the text alignment to be on left. But how could I do that?

What I have tried is like the image below:

alt text

Here is the code:

GUIContent boxText = new GUIContent("This is an example on how does the text on the box is align

My Name is");

    void OnGUI()
    {
        Rect boxGUI = GUILayoutUtility.GetRect(boxText, "Box");
        GUI.Box(boxGUI, boxText);
    }

Anyone know how to make the text to be aligned to the left side?

Thank you.

Write this in OnGUI method

fontStyle = new GUIStyle( GUI.skin.label );
fontStyle.alignment = TextAnchor.MiddleLeft;

Previously you need to declare the fontStyle variable (GUIStyle)

You need to specify in your boxText that you use the fontStyle style, by parameter when creating the GUIContent.