public void UpdateDescription(LayoutWindowType layoutWindow) { if (layoutWindow != null && layoutWindow.GetCurrentLayout().layout != null) { var element = layoutWindow.GetCurrentLayout().layout.GetRootByTag(this.tag); if (element != null) { this.description = element.comment; } } }
public string GetDescription(LayoutWindowType layoutWindow) { if (layoutWindow != null && layoutWindow.layout.layout != null) { var element = layoutWindow.layout.layout.GetRootByTag(this.tag); if (element != null) { return(element.comment); } } return(string.Empty); }
public void OnValidateEditor(LayoutWindowType root, Layout layout) { if (this.layouts == null || this.layouts.Length == 0 || this.layouts[0] == null) { // Setup as default this.types = new string[2]; this.types[0] = "Horizontal"; this.types[1] = "Vertical"; this.layouts = new Layout[2]; this.layouts[0] = layout; layout.enabled = true; this.layouts[1] = new Layout(); UnityEditor.EditorUtility.SetDirty(root); } }
internal void Update_EDITOR(LayoutWindowType layoutWindow) { if (this.layout == null) { return; } this.layout.GetTags(this.tags); foreach (var tag in this.tags) { this.AddComponentLink(tag); } this.components = this.components.Distinct(new ComponentComparer()).ToArray(); // Used for (int i = 0; i < this.components.Length; ++i) { this.components[i].OnValidate(); this.components[i].UpdateDescription(layoutWindow); var index = this.tags.IndexOf(this.components[i].tag); if (index == -1) { this.RemoveComponentLink(this.components[i].tag); continue; } this.tags.RemoveAt(index); } this.layoutResource.tempObject = this.layout; this.layoutResource.Validate(); this.layoutNoResource = (this.layoutResource.IsLoadable() == true ? null : this.layout); }