diff --git a/Assets/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProExportSettings.cs b/Assets/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProExportSettings.cs index 4721e74..5303868 100644 --- a/Assets/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProExportSettings.cs +++ b/Assets/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProExportSettings.cs @@ -1,4 +1,5 @@ -using UnityEngine; +#if UNITY_EDITOR +using UnityEngine; using System.Collections; using MA_Texture; using System.Collections.Generic; @@ -66,4 +67,5 @@ namespace MA_TextureAtlasserPro Sprite, SpriteSliced } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Assets/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs b/Assets/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs index a66b370..10c7a99 100644 --- a/Assets/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs +++ b/Assets/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs @@ -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);