Пример #1
0
        /// <summary>
        /// Pres the draw node window.
        /// </summary>
        /// <param name="item">Item.</param>
        protected override void PreDrawNodeWindow(EditorWindowLayoutItem item)
        {
            ZEntity en = curPoolConfig.CurPool.FindEntityTemplateByID(item.wndID);

            GUI.color = Color.yellow;

            if (en != null)
            {
                ColorAttribute ca = en.GetSupportAttribute <ColorAttribute> ();
                if (ca != null)
                {
                    //Debug.Log ("NodeColor is " + ca.NodeColor);
                    GUI.color = ca.ToUnityColor();
                }
            }

            if (en.EType == EntityType.System)
            {
                GUI.color = Color.gray;
            }
        }