Exemple #1
0
 public override void OnInspectorGUI()
 {
     EZEditorGUIUtility.ScriptTitle(target);
     serializedObject.Update();
     elementList.DoLayoutList();
     serializedObject.ApplyModifiedProperties();
 }
Exemple #2
0
 protected virtual void OnGUI()
 {
     EditorGUILayout.Space();
     EditorGUILayout.LabelField(titleContent.text, EditorStyles.centeredGreyMiniLabel);
     EZEditorGUIUtility.ScriptTitle(this);
     EditorGUILayout.Space();
 }
Exemple #3
0
 public override void OnInspectorGUI()
 {
     EZEditorGUIUtility.ScriptTitle(target);
     serializedObject.Update();
     EditorGUILayout.PropertyField(m_Resolution);
     EditorGUILayout.PropertyField(m_Format);
     EditorGUILayout.PropertyField(m_CapturePath);
     if (GUILayout.Button("Camera Capture"))
     {
         if (!string.IsNullOrEmpty(m_CapturePath.stringValue))
         {
             Directory.CreateDirectory(m_CapturePath.stringValue);
         }
         CameraCapture();
     }
     if (GUILayout.Button("Screen Capture"))
     {
         if (!string.IsNullOrEmpty(m_CapturePath.stringValue))
         {
             Directory.CreateDirectory(m_CapturePath.stringValue);
         }
         ScreenCapture();
     }
     if (GUILayout.Button("Open Folder"))
     {
         if (!string.IsNullOrEmpty(m_CapturePath.stringValue))
         {
             Directory.CreateDirectory(m_CapturePath.stringValue);
         }
         string projectPath = Application.dataPath.Substring(0, Application.dataPath.Length - 7);
         Application.OpenURL(string.Format("file://{0}/{1}", projectPath, m_CapturePath.stringValue));
     }
     serializedObject.ApplyModifiedProperties();
 }
 public override void OnInspectorGUI()
 {
     EZEditorGUIUtility.ScriptTitle(target);
     serializedObject.Update();
     scrollPosition = GUILayout.BeginScrollView(scrollPosition);
     itemList.DoLayoutList();
     GUILayout.EndScrollView();
     serializedObject.ApplyModifiedProperties();
 }
Exemple #5
0
 public override void OnInspectorGUI()
 {
     EZEditorGUIUtility.ScriptTitle(target);
     serializedObject.Update();
     DrawOtherProperties();
     EditorGUILayout.Space();
     EditorGUILayout.PropertyField(m_AllowSwitchOff);
     EditorGUILayout.PropertyField(m_SwitchOnStart);
     EditorGUILayout.PropertyField(m_Next);
     optionList.DoLayoutList();
     serializedObject.ApplyModifiedProperties();
 }
Exemple #6
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EZEditorGUIUtility.ScriptTitle(target);
            EditorGUILayout.PropertyField(m_TransitionType);
            EditorGUI.indentLevel++;
            switch (m_TransitionType.enumValueIndex)
            {
            case (int)EZTransition.TransitionType.None:
                break;

            case (int)EZTransition.TransitionType.Scale:
                EditorGUILayout.PropertyField(m_RectTransform);
                EditorGUILayout.PropertyField(m_ScaleState.FindPropertyRelative("m_NormalScale"));
                EditorGUILayout.PropertyField(m_ScaleState.FindPropertyRelative("m_HighlightedScale"));
                EditorGUILayout.PropertyField(m_ScaleState.FindPropertyRelative("m_PressedScale"));
                EditorGUILayout.PropertyField(m_ScaleState.FindPropertyRelative("m_DisabledScale"));
                break;

            case (int)EZTransition.TransitionType.Size:
                EditorGUILayout.PropertyField(m_RectTransform);
                EditorGUILayout.PropertyField(m_SizeState.FindPropertyRelative("m_NormalSize"));
                EditorGUILayout.PropertyField(m_SizeState.FindPropertyRelative("m_HighlightedSize"));
                EditorGUILayout.PropertyField(m_SizeState.FindPropertyRelative("m_PressedSize"));
                EditorGUILayout.PropertyField(m_SizeState.FindPropertyRelative("m_DisabledSize"));
                break;

            case (int)EZTransition.TransitionType.OutlineDistance:
                EditorGUILayout.PropertyField(m_Outline);
                EditorGUILayout.PropertyField(m_OutlineDistanceState.FindPropertyRelative("m_NormalDistance"));
                EditorGUILayout.PropertyField(m_OutlineDistanceState.FindPropertyRelative("m_HighlightedDistance"));
                EditorGUILayout.PropertyField(m_OutlineDistanceState.FindPropertyRelative("m_PressedDistance"));
                EditorGUILayout.PropertyField(m_OutlineDistanceState.FindPropertyRelative("m_DisabledDistance"));
                break;

            case (int)EZTransition.TransitionType.OutlineColor:
                EditorGUILayout.PropertyField(m_Outline);
                EditorGUILayout.PropertyField(m_OutlineColorState.FindPropertyRelative("m_NormalColor"));
                EditorGUILayout.PropertyField(m_OutlineColorState.FindPropertyRelative("m_HighlightedColor"));
                EditorGUILayout.PropertyField(m_OutlineColorState.FindPropertyRelative("m_PressedColor"));
                EditorGUILayout.PropertyField(m_OutlineColorState.FindPropertyRelative("m_DisabledColor"));
                break;
            }
            EditorGUI.indentLevel--;
            serializedObject.ApplyModifiedProperties();
        }
Exemple #7
0
        public override void OnInspectorGUI()
        {
            EZEditorGUIUtility.ScriptTitle(target);
            GUI.enabled = false;
            EditorGUILayout.ObjectField("Target Object", target, typeof(EZScriptStatisticsObject), true);
            GUI.enabled = true;
            serializedObject.Update();
            EditorGUILayout.BeginHorizontal();
            if (targetObject.result.Count != 0)
            {
                EditorGUILayout.LabelField("Result Time: " + targetObject.resultTime);
            }
            if (GUILayout.Button("Refresh"))
            {
                RefreshResult();
            }
            EditorGUILayout.EndHorizontal();

            scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
            EditorGUILayout.LabelField("File Association", EditorStyles.boldLabel);
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(m_FilePatterns, true);
            EditorGUILayout.PropertyField(m_IncludePaths, true);
            EditorGUILayout.PropertyField(m_ExcludePaths, true);
            EditorGUI.indentLevel--;
            EditorGUILayout.LabelField("Analysis", EditorStyles.boldLabel);
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(m_InfoLineCount);
            EditorGUILayout.PropertyField(m_AuthorRegex);
            EditorGUILayout.PropertyField(m_CreateTimeRegex);
            EditorGUILayout.PropertyField(m_ValidLineRegex);
            EditorGUILayout.HelpBox(new StringBuilder()
                                    .AppendLine(@"'^\W*(\w+)[\S\s]*$': line contains word characters")
                                    .AppendLine(@"'^\W*(\S+)[\S\s]*$': line contains non-white-space characters")
                                    .ToString(), MessageType.Info);
            EditorGUI.indentLevel--;
            EditorGUILayout.LabelField("Result", EditorStyles.boldLabel);
            EditorGUI.indentLevel++;
            DrawResult(targetObject);
            EditorGUI.indentLevel--;
            EditorGUILayout.EndScrollView();
            serializedObject.ApplyModifiedProperties();
        }
Exemple #8
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EZEditorGUIUtility.ScriptTitle(target);
            GUI.enabled = false;
            EditorGUILayout.ObjectField("Target", target, typeof(EZBundleObject), false);
            GUI.enabled = true;

            DrawFunctionButtons();
            DrawBaseProperties();

            EditorGUILayout.Space();
            if (m_CopyListFoldout.boolValue = EditorGUILayout.Foldout(m_CopyListFoldout.boolValue, string.Format("Copy List ({0})", copyList.count)))
            {
                copyList.DoLayoutList();
            }

            if (m_ManagerMode.boolValue)
            {
                EditorGUILayout.BeginHorizontal();
                string label = string.Format("Bundle List ({0})", AssetDatabase.GetAllAssetBundleNames().Length);
                m_BundleListFoldout.boolValue = EditorGUILayout.Foldout(m_BundleListFoldout.boolValue, label);
                EditorGUILayout.EndHorizontal();
                if (m_BundleListFoldout.boolValue)
                {
                    DrawAssetBundleManager();
                }
            }
            else
            {
                EditorGUILayout.BeginHorizontal();
                string label = string.Format("Bundle List ({0})", bundleList.count);
                m_BundleListFoldout.boolValue = EditorGUILayout.Foldout(m_BundleListFoldout.boolValue, label);
                EditorGUILayout.EndHorizontal();
                if (m_BundleListFoldout.boolValue)
                {
                    bundleList.DoLayoutList();
                }
            }

            serializedObject.ApplyModifiedProperties();
        }