【m】UI 更新
This commit is contained in:
@@ -3,8 +3,9 @@ using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if HotUpdate
|
||||
using YooAsset;
|
||||
|
||||
#endif
|
||||
namespace Stary.Evo.UIFarme
|
||||
{
|
||||
public interface IBasePanel : IController
|
||||
@@ -157,7 +158,7 @@ namespace Stary.Evo.UIFarme
|
||||
{
|
||||
return activePanel.gameObject;
|
||||
}
|
||||
|
||||
#if HotUpdate
|
||||
AssetHandle handle = null;
|
||||
if (packageName == null)
|
||||
{
|
||||
@@ -165,7 +166,7 @@ namespace Stary.Evo.UIFarme
|
||||
}
|
||||
else
|
||||
{
|
||||
var package= YooAssets.TryGetPackage(packageName);
|
||||
var package = YooAssets.TryGetPackage(packageName);
|
||||
if (package == null)
|
||||
{
|
||||
handle = YooAssets.LoadAssetAsync<GameObject>(panelName);
|
||||
@@ -179,6 +180,12 @@ namespace Stary.Evo.UIFarme
|
||||
await handle.Task;
|
||||
|
||||
activePanel = GameObject.Instantiate(handle.AssetObject as GameObject, panelParent);
|
||||
#else
|
||||
GameObject handle = Resources.Load<GameObject>(panelName);
|
||||
activePanel = GameObject.Instantiate(handle, panelParent);
|
||||
#endif
|
||||
|
||||
|
||||
activePanel.name = this.GetType().Name;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user