回答編集履歴
3
説明不足
test
CHANGED
@@ -42,6 +42,8 @@
|
|
42
42
|
|
43
43
|
Timer timer = new Timer(t);
|
44
44
|
|
45
|
+
//タイマー自体は別スレッドで動作させる
|
46
|
+
|
45
47
|
timer.Elapsed += (sender, e) =>
|
46
48
|
|
47
49
|
{
|
2
コードのミス
test
CHANGED
@@ -52,9 +52,9 @@
|
|
52
52
|
|
53
53
|
Instantiate(bullet);
|
54
54
|
|
55
|
-
}
|
55
|
+
});
|
56
56
|
|
57
|
-
}
|
57
|
+
};
|
58
58
|
|
59
59
|
timer.Start();
|
60
60
|
|
1
説明不足だったため
test
CHANGED
@@ -5,6 +5,12 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
https://github.com/PimDeWitte/UnityMainThreadDispatcher
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
始めにUnityMainThreadDispatcher.csを張り付けた空のGameObjectをScene内に配置します。
|
12
|
+
|
13
|
+
(自動でDontDestroyOnLoadになります。)
|
8
14
|
|
9
15
|
|
10
16
|
|