mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-11-23 22:15:33 +01:00
Bugfixes: Texture width as height & build errors.
Bugfixes: Texture width as height typo and project build errors.
This commit is contained in:
parent
d8c59e86ca
commit
521cb34541
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
#if UNITY_EDITOR
|
||||||
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using MA_Texture;
|
using MA_Texture;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -66,4 +67,5 @@ namespace MA_TextureAtlasserPro
|
|||||||
Sprite,
|
Sprite,
|
||||||
SpriteSliced
|
SpriteSliced
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -41,7 +41,7 @@ namespace MA_Texture
|
|||||||
RenderTexture.active = tmp;
|
RenderTexture.active = tmp;
|
||||||
|
|
||||||
// Create a new readable Texture2D to copy the pixels to it
|
// 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
|
// Copy the pixels from the RenderTexture to the new Texture
|
||||||
myTexture2D.ReadPixels(new Rect(0, 0, tmp.width, tmp.height), 0, 0);
|
myTexture2D.ReadPixels(new Rect(0, 0, tmp.width, tmp.height), 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user