public void SetLayout(Func <IWindowManager, LayoutInfo> buildLayoutCallback, string activateWindowOfType = null) { Region rootRegion = DockPanel.RootRegion; if (rootRegion == null) { return; } if (m_editor == null) { return; } try { m_lockUpdateLayout = true; bool hasChildren = rootRegion.HasChildren; ClearRegion(rootRegion); foreach (Transform child in DockPanel.Free) { Region region = child.GetComponent <Region>(); ClearRegion(region); } m_editor.StartCoroutine(CoSetLayout(hasChildren, buildLayoutCallback, activateWindowOfType)); } catch { m_lockUpdateLayout = false; } }
public static void BeginEdit() { IRTE editor = IOC.Resolve <IRTE>(); editor.StartCoroutine(CoLoadLayer(loadedLayers => { editor.Selection.activeObject = loadedLayers; })); }
private void OnDestroy() { if (m_isDirty) { IRTE editor = IOC.Resolve <IRTE>(); if (editor != null) { editor.StartCoroutine(CoEndEdit()); } } }
public static void LoadLayers(Action <LayersInfo> callback) { IRTE editor = IOC.Resolve <IRTE>(); editor.StartCoroutine(CoLoadLayer(callback)); }