diff --git a/src/LitMotion/Assets/LitMotion/Runtime/Internal/MotionStorage.cs b/src/LitMotion/Assets/LitMotion/Runtime/Internal/MotionStorage.cs index 0071c645..150e4878 100644 --- a/src/LitMotion/Assets/LitMotion/Runtime/Internal/MotionStorage.cs +++ b/src/LitMotion/Assets/LitMotion/Runtime/Internal/MotionStorage.cs @@ -248,7 +248,16 @@ public void Cancel(MotionHandle handle) } motion.Status = MotionStatus.Canceled; - callbacksArray[denseIndex].OnCancelAction?.Invoke(); + + ref var callbackData = ref GetCallbacksSpan()[denseIndex]; + try + { + callbackData.OnCancelAction?.Invoke(); + } + catch (Exception ex) + { + MotionDispatcher.GetUnhandledExceptionHandler()?.Invoke(ex); + } } public void Complete(MotionHandle handle)