/// <summary>
        /// 高亮面板显示
        /// </summary>
        private void InspectorHighLight()
        {
            if (features.ActiveHighlight)
            {
                _highlight = features.AddHighlight();
                _highlight.highlightType = (HighLightType)EditorGUILayout.EnumPopup("高亮类型:", _highlight.highlightType);

                if (_highlight.highlightType == HighLightType.Model)
                {
                    if (_highlight == null)
                    {
                        return;
                    }
                    _highlight.highlightModel = EditorGUILayout.ObjectField("    *模型高亮:", _highlight.highlightModel, typeof(GameObject), true) as GameObject;
                    if (_highlight.highlightModel == null)
                    {
                        EditorGUILayout.HelpBox("高亮的物体,默认是自己...", MessageType.None);
                    }
                }
                else
                {
                    if (_highlight == null)
                    {
                        return;
                    }

                    _highlight.highlightColor = FrameConfig.Config.highlightColor;

                    _highlight.grabColor = FrameConfig.Config.grabColor;
                }
            }
            else
            {
                features.RemoveHighlight();
                _highlight = null;
            }
        }
Example #2
0
 /// <summary>
 /// 添加“高亮”
 /// </summary>
 public HighlightObject AddHighlight()
 {
     highlightObject           = OperaObject.GetComponent <HighlightObject>() ?? OperaObject.AddComponent <HighlightObject>();
     highlightObject.hideFlags = HideFlags.HideInInspector;
     return(highlightObject);
 }