title: Make rectangle in Unity
body: <p>I stuck on the basics of Unity. I want to make a scene for mobiles in which there are four different coloured rectangles that take 25% of the screen each.</p>
  
  <p><a href="https://i.stack.imgur.com/OnkaQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OnkaQ.png" alt="Mobile scene"></a></p>
  
  <p>I tried making an GameObject Image, "registering" it as a prefab in Inspector.
  Below code is an example of how I tried to make a single red rectangle and position it on the (x,y,z) => (0,0,0) coordinates on my scene.
  Several problems are present:</p>
  
  <ul>
  <li>Rectangle did not appear</li>
  <li>I don't know how to programatically specify width and height of the rectangle</li>
  </ul>
  
  <p>This is how it looks:</p>
  
  <pre><code>public class SceneScript : MonoBehaviour {
  
      public GameObject prefab;
  
      void Start () {
          Vector3 pos = new Vector3(0, 0, 0);
  
          GameObject gameObject = Instantiate(prefab);
          Image image = gameObject.GetComponent&lt;Image&gt;();
          image.color = new Color(1.0F, 0.0F, 0.0F);
  
          gameObject.transform.position = new Vector3(0, 0, 0);
      }
  
      // Update is called once per frame
      void Update () {
  
      }
  }
  </code></pre>
  
  <p>Is there an easier solution, or is this the best practice + could you please provide me some hints what should I do?</p>