mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
修正UIWindow资源句柄时序导致UI同步显示失效的问题。
This commit is contained in:
@@ -255,7 +255,8 @@ namespace TEngine
|
|||||||
this.userDatas = userDatas;
|
this.userDatas = userDatas;
|
||||||
if (!FromResources)
|
if (!FromResources)
|
||||||
{
|
{
|
||||||
GameModule.Resource.LoadAssetAsync<GameObject>(location, Handle_Completed, needCache: NeedCache);
|
Handle = GameModule.Resource.LoadAssetAsyncHandle<GameObject>(location, needCache: NeedCache);
|
||||||
|
Handle.Completed += Handle_Completed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -394,13 +395,11 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
throw new GameFrameworkException("Load uiWindows Failed because AssetObject is null");
|
throw new GameFrameworkException("Load uiWindows Failed because AssetObject is null");
|
||||||
}
|
}
|
||||||
Handle = handle;
|
|
||||||
|
|
||||||
// 实例化对象
|
// 实例化对象
|
||||||
var panel = handle.InstantiateSync(UIModule.UIRootStatic);
|
var panel = handle.InstantiateSync(UIModule.UIRootStatic);
|
||||||
if (!NeedCache)
|
if (!NeedCache)
|
||||||
{
|
{
|
||||||
AssetReference.BindAssetReference(panel, handle, AssetName);
|
AssetReference.BindAssetReference(panel, Handle, AssetName);
|
||||||
}
|
}
|
||||||
Handle_Completed(panel);
|
Handle_Completed(panel);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user