No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SpriteCache.cs 623B

12345678910111213141516171819202122232425262728
  1. using UnityEngine;
  2. namespace UnityEditor.U2D.Animation
  3. {
  4. internal class SpriteCache : TransformCache
  5. {
  6. [SerializeField]
  7. string m_ID;
  8. [SerializeField]
  9. Rect m_TextureRect;
  10. [SerializeField]
  11. Vector2 m_PivotNormalized;
  12. public string id
  13. {
  14. get => m_ID;
  15. internal set => m_ID = value;
  16. }
  17. public Rect textureRect
  18. {
  19. get => m_TextureRect;
  20. set => m_TextureRect = value;
  21. }
  22. public Vector2 pivotRectSpace => Vector2.Scale(textureRect.size, m_PivotNormalized);
  23. }
  24. }