diff --git a/Source/Scripts/Core/NTexture.cs b/Source/Scripts/Core/NTexture.cs
index d57085e4..231c4686 100644
--- a/Source/Scripts/Core/NTexture.cs
+++ b/Source/Scripts/Core/NTexture.cs
@@ -109,7 +109,6 @@ public NTexture(Texture texture) : this(texture, null, 1, 1)
///
public NTexture(Texture texture, Texture alphaTexture, float xScale, float yScale)
{
-
_root = this;
_nativeTexture = texture;
_alphaTexture = alphaTexture;
@@ -176,6 +175,23 @@ public NTexture(NTexture root, Rect region, bool rotated, Vector2 originalSize,
_offset = offset;
}
+ ///
+ ///
+ ///
+ ///
+ public NTexture(Sprite sprite)
+ {
+ Rect rect = sprite.rect;
+ rect.y = sprite.texture.height - rect.yMax;
+
+ _root = this;
+ _nativeTexture = sprite.texture;
+ _region = rect;
+ _originalSize = new Vector2(_region.width, _region.height);
+ uvRect = new Rect(_region.x / _nativeTexture.width, 1 - _region.yMax / _nativeTexture.height,
+ _region.width / _nativeTexture.width, _region.height / _nativeTexture.height);
+ }
+
///
///
///