mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Make ThreadingHelper run before other scripts
This commit is contained in:
1 parent
f9eee41b33
commit
503e39675f
1 file changed
+2
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user