static Logger() { root = new UiRoot(); vertical = new VerticalLayout(); root.AddChild(vertical); categories = new Dictionary <string, Foldable>(); }
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); }; } }
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); }; } }
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>(); }; }
void Awake() { ins = this; }
void Awake() { instance = this; Application.logMessageReceived += LogUnity; }