Start
AsObservable
AsSingleUnitObservable
AsUnitObservable
ToAsync
ForEachAsync
Start
启动一个异步方法来返回方法的执行结果,创建一个流,将流的方法数据输出到基础流,图解
执行结果
代码示例
public class No13_Mixed3 : MonoBehaviour
{
void Start()
{
var start = Observable.Start(StartMethod);
start.Subscribe(Next, Error, Complete);
}
void StartMethod()
{
Debug.LogFormat("StartMethod");
}
void Next(Unit unit)
{
Debug.LogFormat("Start事件发生了");
}
void Error(Exception ex)
{
Debug.LogException(ex);
}
void Complete()
{
Debug.Lo