mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed AtlasRegion.ToTexture scope.
This commit is contained in:
parent
444ef0feee
commit
0ebc2e471f
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user