Skip to content

Instantly share code, notes, and snippets.

@todorok1 todorok1/ThreadTester.cs
Last active Aug 31, 2018

Embed
What would you like to do?
Unity APIを別スレッドで呼んでみるテスト
using UnityEngine;
using System.Threading;
public class ThreadTester : MonoBehaviour {
Thread anotherThread;
void Start(){
// 別スレッドを起動
anotherThread = new Thread(AnotherThreadProcess);
anotherThread.Start();
}
void AnotherThreadProcess(){
// Unity APIを呼んでみよう。
gameObject.AddComponent<Rigidbody>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.