Skip to content

Commit

Permalink
Bugfixes: Texture width as height & build errors.
Browse files Browse the repository at this point in the history
Bugfixes: Texture width as height typo and project build errors.
  • Loading branch information
maxartz15 committed Jan 14, 2020
1 parent d8c59e8 commit 521cb34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
#if UNITY_EDITOR
using UnityEngine;
using System.Collections;
using MA_Texture;
using System.Collections.Generic;
Expand Down Expand Up @@ -66,4 +67,5 @@ public enum TextureType
Sprite,
SpriteSliced
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static Texture ConvertToReadableTexture(Texture texture)
RenderTexture.active = tmp;

// Create a new readable Texture2D to copy the pixels to it
Texture2D myTexture2D = new Texture2D(texture.width, texture.width);
Texture2D myTexture2D = new Texture2D(texture.width, texture.height);

// Copy the pixels from the RenderTexture to the new Texture
myTexture2D.ReadPixels(new Rect(0, 0, tmp.width, tmp.height), 0, 0);
Expand Down

0 comments on commit 521cb34

Please sign in to comment.