Skip to content

Instantly share code, notes, and snippets.

@phi16
phi16 / AnimationLooper.cs
Last active January 11, 2024 09:56
Make a loop animation from non-loop (but nearly looping) animation
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class AnimationLooper : MonoBehaviour {
[SerializeField] private AnimationClip clip;
[SerializeField] private float overlapTime = 0.5f;
[SerializeField] private string path;
#if UNITY_EDITOR