예제 #1
0
 /// <summary>
 /// 资源池创建
 /// </summary>
 public sealed override void OnFormAssetCreate()
 {
     if (RootGo == null)
     {
         JW.Common.Log.LogE("UIPrefabClass.PoolCreate error - failed to create : {0}", GetPath());
         return;
     }
     //获取组件
     Form = RootGo.ExtGetComponent <UIForm>();
     if (Form == null)
     {
         JW.Common.Log.LogE("UIPrefabClass.PoolCreate error - failed to get UIPrefab component : {0}", GetPath());
         return;
     }
     Form.FormPath   = GetPath();
     Form.Controller = this;
     OnResourceLoaded();
 }
예제 #2
0
 /// <summary>
 /// 获取自身的组件
 /// </summary>
 /// <typeparam name="T">组件类型</typeparam>
 /// <returns>组件</returns>
 protected T GetComponent <T>() where T : Component
 {
     return(null != RootGo?RootGo.ExtGetComponent <T>() : null);
 }