[unity] Fixed AtlasRegion.ToTexture scope.

This commit is contained in:
pharan 2017-02-09 07:48:46 +08:00
parent 444ef0feee
commit 0ebc2e471f

View File

@ -341,7 +341,7 @@ namespace Spine.Unity.Modules.AttachmentTools {
return Sprite.Create(ar.GetMainTexture(), ar.GetUnityRect(), new Vector2(0.5f, 0.5f), pixelsPerUnit);
}
internal static Texture2D ToTexture (this AtlasRegion ar, bool applyImmediately = true) {
public static Texture2D ToTexture (this AtlasRegion ar, bool applyImmediately = true) {
Texture2D sourceTexture = ar.GetMainTexture();
Rect r = ar.GetUnityRect(sourceTexture.height);
Texture2D output = new Texture2D((int)r.width, (int)r.height);