Example #1
0
        static Logger()
        {
            root     = new UiRoot();
            vertical = new VerticalLayout();

            root.AddChild(vertical);

            categories = new Dictionary <string, Foldable>();
        }
Example #2
0
        public void Create(Alert alert)
        {
            UiRoot root = UiManager.Instance.uiRoot;

            root.LoadMenu <AlertRegion>(typeof(AlertMenu));

            if (root.GetMenuRegion(out AlertRegion alertRegion))
            {
                alertRegion.OnLoaded += menu =>
                {
                    (menu as AlertMenu)?.Attach(alert);
                };
            }
        }
Example #3
0
        public void Create(Window window)
        {
            UiRoot root = UiManager.Instance.uiRoot;

            root.LoadMenu <WindowRegion>(typeof(WindowMenu));

            if (root.GetMenuRegion(out WindowRegion windowRegion))
            {
                windowRegion.OnLoaded += menu =>
                {
                    (menu as WindowMenu)?.Attach(window);
                };
            }
        }
Example #4
0
        private void Start()
        {
            Addressables.LoadAssetAsync <GameObject>(UiConstants.UiRootAddress)
            .Completed += response =>
            {
                if (!response.IsValid() || response.Status != AsyncOperationStatus.Succeeded)
                {
                    Debug.LogError($"can't load prefab {UiConstants.UiRootAddress}");

                    return;
                }

                uiRoot = Instantiate(response.Result).GetComponent <UiRoot>();
            };
        }
Example #5
0
 void Awake()
 {
     ins = this;
 }
 void Awake()
 {
     instance = this;
     Application.logMessageReceived += LogUnity;
 }