Merge branch 'main' of http://server.bitfall.icu:3000/root/BITKit
This commit is contained in:
commit
cd35241711
|
@ -83,6 +83,8 @@ namespace BITKit
|
|||
TickRate = 1;
|
||||
}
|
||||
|
||||
_timer.Interval = 1000d / TickRate;
|
||||
|
||||
_timer.Elapsed += OnElapsed;
|
||||
|
||||
if (_isDisposed is false)
|
||||
|
|
|
@ -142,24 +142,22 @@ namespace BITKit
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
if (IsEditorSimulateMode is false && isOffline)
|
||||
|
||||
if (isOffline&& IsEditorSimulateMode is false)
|
||||
{
|
||||
initParameters = new OfflinePlayModeParameters();
|
||||
}
|
||||
#else
|
||||
if (isOffline)
|
||||
{
|
||||
initParameters = new OfflinePlayModeParameters();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
InitializationOperation initOperation = null;
|
||||
try
|
||||
{
|
||||
initOperation = package.InitializeAsync(initParameters);
|
||||
_progressLabel.text ="正在初始化资源系统...";
|
||||
|
||||
var text = $"正在初始化资源系统...,使用{initParameters.GetType().Name}";
|
||||
|
||||
_progressLabel.text =text;
|
||||
|
||||
Debug.Log(text);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -50,6 +50,9 @@ namespace BITKit.UX
|
|||
VisualTreeAsset = await ModService.LoadAsset<VisualTreeAsset>(DocumentPath);
|
||||
|
||||
RootVisualElement = UXService.Root.As<VisualElement>().Create(VisualTreeAsset);
|
||||
|
||||
RootVisualElement.name = DocumentPath;
|
||||
|
||||
RootVisualElement.pickingMode = PickingMode.Ignore;
|
||||
RootVisualElement.style.position = Position.Absolute;
|
||||
RootVisualElement.style.left = 0;
|
||||
|
@ -78,12 +81,12 @@ namespace BITKit.UX
|
|||
invisible.style.backgroundColor = new Color(0, 0, 0, 0.9f);
|
||||
}
|
||||
|
||||
UXUtils.Inject(this);
|
||||
UXUtils.Inject(this,RootVisualElement);
|
||||
|
||||
OnInitiated?.Invoke();
|
||||
|
||||
RootVisualElement.SetActive(false);
|
||||
|
||||
OnInitiated?.Invoke();
|
||||
|
||||
await OnInitiatedAsync.UniTaskFunc();
|
||||
|
||||
WaitUtilInitialized.TrySetResult();
|
||||
|
|
Loading…
Reference in New Issue