public override void Update() { Instance = this; if (!CanUpdate()) { return; } base.Update(); //[Main window close] or [related node deleted] ===> close this window if (SWWindowMain.Instance == null || !SWWindowMain.Instance.NodeAll().ContainsKey(node.data.id)) { Close(); return; } }
void DrawWin(int id) { base.DrawNodeWindow(id); DrawPreview(rectArea); if (GUI.Button(new Rect(rectBotButton.x, rectBotButton.y, rectBotButton.width - buttonHeight, rectBotButton.height), "Edit", SWEditorUI.MainSkin.button)) { SWWindowDrawMask.ShowEditor(this); } if (GUI.Button(new Rect(rectBotButton.x + rectBotButton.width - buttonHeight, rectBotButton.y, buttonHeight, rectBotButton.height), "+", SWEditorUI.MainSkin.button)) { data.useGray = !data.useGray; } DrawNodeWindowEnd(); }
public override void Awake() { base.Awake(); Instance = this; }