I just wanted to ask what is the proper way to create and display a view on Unity. I'm just a beginner on this and just watched recently tutorials on how to script and learned about creating GUI on the fly which includes buttons, edit text boxes and other view but not sure on how should I really implement it the way it is optimized and won't affect the applications performance. What I tried so far is to create an editText wherein I set it on the MainCamera for display which is I targeted to be reusable so that in case I need to add more editText on the app I can just drag and drop the script. Here's the code so far:

```
using UnityEngine;
using System.Collections;

public class EditText : MonoBehaviour {

    public int width = 150;
    public int height = 25;
    public int x_position = 0;
    public int y_position = 0;
    public string text = "Hello World";
    public Position position = Position.unset;
    public int text_size = 15;

    public enum Position{unset,center_screen, center_vertical, center_horizontal};

    void OnGUI () {
        setPosition ();

        GUI.skin.textArea.fontSize = text_size;
        GUI.color = Color.red;
    }

    private void setPosition(){
        switch (position) {
        case Position.center_screen:
            GUI.TextArea (new Rect (Screen.width/2 - width/2, Screen.height/2 - height/2, width, height), text);
            GUI.backgroundColor = Color.white;
            break;
        case Position.center_vertical:
            GUI.TextArea (new Rect (x_position, Screen.height/2 - height/2, width, height), text);
            GUI.backgroundColor = Color.white;
            break;
        case Position.center_horizontal:
            GUI.TextArea (new Rect (Screen.width/2 - width/2, y_position, width, height), text);
            GUI.backgroundColor = Color.white;
            break;
        default:
            GUI.TextArea (new Rect (x_position, y_position, width, height), text);
            GUI.backgroundColor = Color.white;
            break;
        }
    }

}

```

Question is am I doing this right or should I stop and use other implementation? Since I really intended it to be as reusable just like the Android Views. Also if there is any other library or scripts I can use to achieve this so that I'm not reinventing the wheel for this?

On the side note I also searched the NGUI although I'm not that sure on if this will fit my needs or not. Since when I tried creating a UILabel the component has only few options where I am not really sure on how I supposed to use it.