mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-21 15:20:24 +00:00
import from UniRx and some modified.
This commit is contained in:
20
Assets/Scenes/SandboxMain.cs
Normal file
20
Assets/Scenes/SandboxMain.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UniRx.Async;
|
||||
using UnityEngine;
|
||||
|
||||
public class SandboxMain : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
RunAsync().Forget();
|
||||
}
|
||||
|
||||
async UniTaskVoid RunAsync()
|
||||
{
|
||||
var id = await UniTask.Run(() => System.Threading.Thread.CurrentThread.ManagedThreadId, configureAwait: false);
|
||||
UnityEngine.Debug.Log("ReturnId:" + id);
|
||||
UnityEngine.Debug.Log("CurrentId:" + System.Threading.Thread.CurrentThread.ManagedThreadId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user