title: Unity 180 rotation for a Texture2D, or maybe flip both
body: <p>I could use just a little help. I am loading a png into a <code>Texture2D</code>, and have managed to flip it over the y axis using the following script I found. I need to flip it over the x axis now. I know a small modification should do it, but I have not managed to get the results I want.</p>
  
  <pre><code>    Texture2D FlipTexture(Texture2D original){
      Texture2D flipped = new Texture2D(original.width,original.height);
  
      int xN = original.width;
      int yN = original.height;
  
      for(int i=0;i&lt;xN;i++){
          for(int j=0;j&lt;yN;j++){
              flipped.SetPixel(xN-i-1, j, original.GetPixel(i,j));
          }
      }
  
      flipped.Apply();
  
      return flipped;
  }
  </code></pre>