From 1c09724a4f425f0f737fa5bd5a05b144e37f4ff3 Mon Sep 17 00:00:00 2001 From: AnnulusGames Date: Tue, 16 Jan 2024 08:38:20 +0900 Subject: [PATCH] Add: MotionDispatcher.Clear() --- .../Assets/LitMotion/Runtime/MotionDispatcher.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LitMotion/Assets/LitMotion/Runtime/MotionDispatcher.cs b/src/LitMotion/Assets/LitMotion/Runtime/MotionDispatcher.cs index 8f0d2621..0d938f7d 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/MotionDispatcher.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/MotionDispatcher.cs @@ -127,6 +127,14 @@ static MinimumList GetRunnerList(PlayerLoopTiming playerLoopTimin [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void Init() + { + Clear(); + } + + /// + /// Cancel all motions. + /// + public static void Clear() { foreach (var playerLoopTiming in playerLoopTimings) {