File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,19 @@ public static class TweenExtensions
1313
1414 private static CancellationToken CancellationToken => ( _cancellationTokenSource != null ) ? _cancellationTokenSource . Token : CancellationToken . None ;
1515
16- private static bool CanTween => Application . isPlaying && ! CancellationToken . IsCancellationRequested ;
16+ private static bool CanTween => CanTweenPredicate . Invoke ( ) ;
17+
18+ private static Func < bool > _canTweenPredicate = DefaultCanTweenPredicate ;
19+ public static Func < bool > CanTweenPredicate
20+ {
21+ get => _canTweenPredicate ;
22+ set => _canTweenPredicate = value ?? DefaultCanTweenPredicate ;
23+ }
24+
25+ private static bool DefaultCanTweenPredicate ( )
26+ {
27+ return Application . isPlaying && ! CancellationToken . IsCancellationRequested ;
28+ }
1729
1830 [ RuntimeInitializeOnLoadMethod ]
1931 public static void Initialize ( )
You can’t perform that action at this time.
0 commit comments