mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 06:19:47 -05:00
27 lines
544 B
C#
27 lines
544 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace VRMShaders
|
|
{
|
|
/// <summary>
|
|
/// 同期実行
|
|
/// </summary>
|
|
public sealed class ImmediateCaller : IAwaitCaller
|
|
{
|
|
public Task NextFrame()
|
|
{
|
|
return Task.FromResult<object>(null);
|
|
}
|
|
|
|
public Task Run(Action action)
|
|
{
|
|
action();
|
|
return Task.FromResult<object>(null);
|
|
}
|
|
|
|
public Task<T> Run<T>(Func<T> action)
|
|
{
|
|
return Task.FromResult(action());
|
|
}
|
|
}
|
|
} |