IComponentGetter.cs 402 B

123456789101112131415
  1. using UnityEngine;
  2. namespace XGame.Framework.UI
  3. {
  4. public interface IComponentGetter
  5. {
  6. /// <summary>
  7. /// 获取指定序列化对象的Component
  8. /// </summary>
  9. /// <typeparam name="T"></typeparam>
  10. /// <param name="key">序列化对象的名字</param>
  11. /// <returns></returns>
  12. T GetComponent<T>(string key) where T : Component;
  13. }
  14. }