Skip to content

Commit

Permalink
Merge branch 'Primary' of https://github.com/creeperlv/CLUNL into Pri…
Browse files Browse the repository at this point in the history
…mary
  • Loading branch information
creeperlv committed Feb 24, 2022
2 parents eb28655 + 206c8d4 commit 48c6267
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CLUNL.Unity3D/Sync/Dispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ public class Dispatcher
//static ImmutableQueue<Action> iactions = ImmutableQueue<Action>.Empty;
static ConcurrentQueue<Action> actions = new ConcurrentQueue<Action>();
static object _lock = new object();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Inited()
{
return init;
}
static bool init = false;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void MarkInit()
{
init = true;
}
/// <summary>
/// Call to perform a sync operation every frame.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions CLUNL.Unity3D/Sync/DispatcherController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public void Start()
Destroy(gameObject);
return;
}
Dispatcher.MarkInit();
DontDestroyOnLoad(gameObject);
}
public void Update()
Expand Down

0 comments on commit 48c6267

Please sign in to comment.