2026-05-29 로딩기능

This commit is contained in:
2026-05-29 12:25:32 +09:00
parent 7ad70e7997
commit 3190f10d7d
19 changed files with 167 additions and 29 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Threading;
using UnityEngine;
public static class Util
{
/// 특정 시간(초) 후에 액션을 실행
public static async Awaitable RunDelayed(float delay, Action action, CancellationToken token = default)
{
try
{
// 유니티 전용 비동기 대기
await Awaitable.WaitForSecondsAsync(delay, token);
// 함수 실행
action?.Invoke();
}
catch (OperationCanceledException)
{
// 취소되었을 때의 처리 (필요 시)
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ff3976febb8799345a121b8ca2a28e3d