Fix error on image.frame(s) not set.

This commit is contained in:
2023-02-17 21:12:41 +08:00
parent 2d4087dc89
commit 6a648c2dcd
2 changed files with 12 additions and 8 deletions

View File

@@ -45,10 +45,12 @@ namespace Cryville.Crtr.Components {
}
protected override void UpdateUV() {
var frame = CurrentFrame;
if (SpriteInfo.IsNullOrEmpty(frame)) return;
Vector2[] muv = OriginalUV;
Vector2[] uv = new Vector2[muv.Length];
var frame = CurrentFrame;
var or = frame.Ratio;
var sr = Scale.x / Scale.y;
var b = new Vector2(