Exemplo n.º 1
0
        public override void Draw(bool highlight)
        {
            DrawNode(viewPage.name, highlight);
            var btnRect = new Rect(drawRect.x, drawRect.y + drawRect.height - 40, drawRect.width, 18);

            bool btnInteractiable = IsInactivable;

            if (Application.isPlaying)
            {
                btnInteractiable = ViewSystemVisualEditor.allowPreviewWhenPlaying && IsInactivable;
            }
            if (CustomElement.Button(id, btnRect, new GUIContent("Preview"), new GUIStyle("ObjectPickerResultsEven"), btnInteractiable))
            {
                OnPreviewBtnClick?.Invoke(viewPage);
                isSelect = false;
            }
        }