UniTaskMotionExtensions
Wait through UniTask or update an AsyncReactiveProperty. Choose the action taken when the wait token is canceled.
public static class UniTaskMotionExtensionsRequires com.cysharp.unitask
Members
ToUniTask
Wait for the handle via UniTask and choose how token cancellation affects the underlying motion.
public static UniTask ToUniTask(this MotionHandle handle, CancellationToken cancellationToken = default)Parameters and return value
handlethis MotionHandleHandle to control or link.cancellationToken = defaultCancellationTokenToken used to cancel the wait.- Returns
UniTask
public static UniTask ToUniTask(this MotionHandle handle, CancelBehavior cancelBehavior, CancellationToken cancellationToken = default)Parameters and return value
handlethis MotionHandleHandle to control or link.cancelBehaviorCancelBehaviorAction applied to the tween when the wait token is canceled.cancellationToken = defaultCancellationTokenToken used to cancel the wait.- Returns
UniTask
public static UniTask ToUniTask(this MotionHandle handle, CancelBehavior cancelBehavior, bool cancelAwaitOnMotionCanceled, CancellationToken cancellationToken = default)Parameters and return value
handlethis MotionHandleHandle to control or link.cancelBehaviorCancelBehaviorAction applied to the tween when the wait token is canceled.cancelAwaitOnMotionCanceledboolWhether canceling the motion itself also cancels the wait.cancellationToken = defaultCancellationTokenToken used to cancel the wait.- Returns
UniTask
BindToAsyncReactiveProperty
Write interpolated values to an AsyncReactiveProperty.
public static MotionHandle BindToAsyncReactiveProperty(this FloatMotionBuilder builder, AsyncReactiveProperty<float> reactiveProperty)Parameters and return value
builderthis FloatMotionBuilderConfigured builder, passed as the receiver for extension calls.reactivePropertyAsyncReactiveProperty<float>Reactive property that receives each sampled value.- Returns
MotionHandle
public static MotionHandle BindToAsyncReactiveProperty<TValue, TOptions, TAdapter>(this MotionBuilder<TValue, TOptions, TAdapter> builder, AsyncReactiveProperty<TValue> reactiveProperty)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter<TValue, TOptions>Parameters and return value
builderthis MotionBuilder<TValue, TOptions, TAdapter>Configured builder, passed as the receiver for extension calls.reactivePropertyAsyncReactiveProperty<TValue>Reactive property that receives each sampled value.- Returns
MotionHandle
MeatMotion