FguiModuleBuilder.cs 666 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. namespace XGame.Framework.FGUI
  3. {
  4. public class FguiModuleBuilder : UI.UIModuleBuilder
  5. {
  6. protected override void CreateProduct()
  7. {
  8. product = new FguiModule(assetModule, uiTree);
  9. }
  10. protected override void CreateUITree()
  11. {
  12. const string uiTreeName = "FGUI/UITree";
  13. var instance = Object.Instantiate(Resources.Load<FguiTree>(uiTreeName));
  14. Assert.IsNotNull(instance, "UITree不能为空.");
  15. instance.gameObject.name = "UITree";
  16. instance.transform.SetParent(AppManager.Root, false);
  17. uiTree = instance;
  18. }
  19. }
  20. }