Make ThreadingHelper run before other scripts

This commit is contained in:
ManlyMarco committed 2019-09-16 18:40:59 +02:00
1 parent f9eee41b33
commit 503e39675f
1 file changed
+2
+2
View File
@@ -10,6 +10,7 @@ namespace BepInEx
/// <summary>
/// Provides methods for running code on other threads and synchronizing with the main thread.
/// </summary>
[DefaultExecutionOrder(int.MinValue)]
public sealed class ThreadingHelper : MonoBehaviour, ISynchronizeInvoke
{
private readonly object _invokeLock = new object();
@@ -47,6 +48,7 @@ namespace BepInEx
private void Update()
{
// The CurrentThread can change between Awake and later methods, it's safest to get it here.
if (_mainThread == null)
_mainThread = Thread.CurrentThread;