title: Unity GridLayoutGroup children ignoring resizing
body: <p>Can anyone explain why, in the editor I get:</p>
  
  <p><a href="https://i.stack.imgur.com/f1lVK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f1lVK.jpg" alt="enter image description here"></a></p>
  
  <p>while, on my Galaxy S6, I get:</p>
  
  <p><a href="https://i.stack.imgur.com/TguvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TguvQ.png" alt="enter image description here"></a></p>
  
  <p>My <code>Panel</code> UI element (which is the parent) has the <code>GridLayoutGroup</code> component, as well as the <code>ContentSizeFitter</code>. The child elements have a <code>LayoutElement</code> component with a FlexibleWidth/Height of 120 and all anchors are set to stretch in all directions.</p>
  
  <p>The <code>Canvas</code> is set to Scale with Screen size, with a reference res of 320x480 and screen mode is to match height.</p>
  
  <p>Regardless of the amount of squares (which is dynamic) the editor perfectly resizes child elements within the parent, but my device makes them tiny. I'm really confused. </p>
  
  <p>There is no setting of sizes or anchors within the script, purely an instantiate and an assignment of parent, like so:</p>
  
  <pre><code>    for(int i=0; i &lt; amount; i++)
      {
          GameObject emptyCell = (GameObject)Instantiate(emptyCellObject);
          emptyCell.transform.SetParent(cellHolder);
          emptyCell.GetComponent&lt;RectTransform&gt;().localPosition = new Vector3(0f, 0f, 0f);
          emptyCells.Add(emptyCell);
      }
  </code></pre>
  
  <p>I've also checked all docs related to: <a href="http://docs.unity3d.com/Manual/comp-UIAutoLayout.html" rel="nofollow noreferrer">http://docs.unity3d.com/Manual/comp-UIAutoLayout.html</a> - And even UI tutorial movies, as well as some blog posts about the 'new' UI tools, but nothing changes the dimensions on the physical device, and seems to change nothing in the editor as that remains the same.</p>
  
  <p>I'm sure I'm doing something silly, but I've exhausted all avenues and was hoping someone had come across this oddity previously.</p>