Skip to content

Commit 17e9ea0

Browse files
marwiehybridherbst
authored andcommitted
Spritesheet Animation: warn if spritesheet used for animation has only one frame
1 parent 8aed9a8 commit 17e9ea0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Runtime/Scripts/SceneExporter/ExporterAnimation.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,12 @@ private void CollectClipCurves(GameObject root, AnimationClip clip, Dictionary<s
11341134
var spriteSheetPath = AssetDatabase.GetAssetPath(spriteSheet);
11351135
// will only work with all sprites from the same spritesheet right now
11361136
var sprites = AssetDatabase.LoadAllAssetRepresentationsAtPath(spriteSheetPath);
1137+
if (sprites.Length == 1)
1138+
{
1139+
Debug.LogWarning(
1140+
$"Spritesheet animation {spriteSheet.name} has only one frame. Exporting sprite animation using multiple image files is currently not supported. If you intent to export animated sprites please provide a spritesheet containing all your frames.",
1141+
spriteRenderer);
1142+
}
11371143

11381144
var path = binding.propertyName;
11391145
if (!targetCurves.ContainsKey(path))

0 commit comments

Comments
 (0)