Singularity/Library/PackageCache/com.unity.2d.animation@7.0.10/Editor/SkinningModule/SkinningCache/SpriteCache.cs
2024-05-06 11:45:45 -07:00

29 lines
623 B
C#

using UnityEngine;
namespace UnityEditor.U2D.Animation
{
internal class SpriteCache : TransformCache
{
[SerializeField]
string m_ID;
[SerializeField]
Rect m_TextureRect;
[SerializeField]
Vector2 m_PivotNormalized;
public string id
{
get => m_ID;
internal set => m_ID = value;
}
public Rect textureRect
{
get => m_TextureRect;
set => m_TextureRect = value;
}
public Vector2 pivotRectSpace => Vector2.Scale(textureRect.size, m_PivotNormalized);
}
}