Merge branch 'main' of http://server.bitfall.icu:3000/root/BITKit
This commit is contained in:
@@ -11,6 +11,10 @@ namespace BITKit.Mod
|
||||
|
||||
public static async UniTask<T> LoadAsset<T>(string location) where T : class
|
||||
{
|
||||
if (LoadAssetAsyncFactory is null)
|
||||
{
|
||||
throw new Exception("LoadAssetAsyncFactory is null!Make sure Processor has been initialized.");
|
||||
}
|
||||
foreach (var func in LoadAssetAsyncFactory.CastAsFunc())
|
||||
{
|
||||
var value = await func.Invoke(location);
|
||||
|
@@ -98,10 +98,18 @@ namespace BITKit
|
||||
try
|
||||
{
|
||||
if(_isDisposed)return;
|
||||
|
||||
if (IsSyncContext)
|
||||
{
|
||||
await BITApp.SwitchToMainThread();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEditor.EditorApplication.isPaused)
|
||||
{
|
||||
_timer.Start();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(_isDisposed)return;
|
||||
}
|
||||
|
||||
@@ -165,7 +173,9 @@ namespace BITKit
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
_isDisposed = true;
|
||||
_timer.Stop();
|
||||
_timer.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user