1
This commit is contained in:
@@ -103,10 +103,11 @@ namespace BITKit
|
||||
if (IsSyncContext)
|
||||
{
|
||||
await BITApp.SwitchToMainThread();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
await BITApp.SwitchToMainThread();
|
||||
if (UnityEditor.EditorApplication.isPaused)
|
||||
{
|
||||
_timer.Interval = 1000d / TickRate;
|
||||
_timer.Start();
|
||||
return;
|
||||
}
|
||||
@@ -164,12 +165,19 @@ namespace BITKit
|
||||
TickCount++;
|
||||
|
||||
if(_isDisposed)return;
|
||||
_timer.Interval = 1000d / TickRate;
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
public bool IsSyncContext { get; set; } = true;
|
||||
public ulong TickCount { get; set; }
|
||||
public int TickRate { get; set; }
|
||||
|
||||
public int TickRate
|
||||
{
|
||||
get => _tickRate;
|
||||
set => _tickRate = Math.Clamp(value, 1, int.MaxValue);
|
||||
}
|
||||
private int _tickRate;
|
||||
public bool IsConcurrent { get; set; }
|
||||
public event Func<float, UniTask> OnTickAsync;
|
||||
|
||||
|
Reference in New Issue
Block a user