complete infrastructure

This commit is contained in:
Yoshifumi Kawai
2020-04-18 05:07:59 +09:00
parent 232e2eb1f2
commit 2ccaf0a03b
20 changed files with 2325 additions and 105 deletions

View File

@@ -3,6 +3,7 @@
using System;
using System.Threading;
using UnityEngine.Events;
namespace UniRx.Async
{
@@ -86,6 +87,16 @@ namespace UniRx.Async
asyncAction().Forget();
}
public static Action VoidAction(Func<UniTask> asyncAction)
{
return () => Void(asyncAction);
}
public static UnityAction VoidUnityAction(Func<UniTask> asyncAction)
{
return () => Void(asyncAction);
}
/// <summary>
/// helper of create add UniTaskVoid to delegate.
/// For example: FooEvent += (sender, e) => UniTask.Void(async arg => { /* */ }, (sender, e))