Bugfixes: Texture width as height & build errors.

Bugfixes: Texture width as height typo and project build errors.
This commit is contained in:
max 2020-01-14 19:42:30 +01:00
parent d8c59e86ca
commit 521cb34541
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using UnityEngine;
#if UNITY_EDITOR
using UnityEngine;
using System.Collections;
using MA_Texture;
using System.Collections.Generic;
@ -67,3 +68,4 @@ namespace MA_TextureAtlasserPro
SpriteSliced
}
}
#endif

View File

@ -41,7 +41,7 @@ namespace MA_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);