public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(target);

            EditorGUILayout.Space();

            EGUI.BeginGUIColor(Color.grey);
            {
                EditorGUILayout.BeginVertical(EditorStyles.helpBox);
                {
                    EGUILayout.DrawBoxHeader("Native Drawer Setting", GUILayout.ExpandWidth(true));
                    EGUI.BeginIndent();
                    {
                        NativeDrawerSetting.IsShowHelp = EditorGUILayout.Toggle("Is Show Help", NativeDrawerSetting.IsShowHelp);
                    }
                    EGUI.EndIndent();
                }
                EditorGUILayout.EndVertical();
            }
            EGUI.EndGUIColor();

            EditorGUILayout.Space();

            EGUI.BeginLabelWidth(GetLabelWidth());
            {
                drawerObject.OnGUILayout();
            }
            EGUI.EndLableWidth();
        }
Esempio n. 2
0
        public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(target);
            EditorGUILayout.Space();

            //if(searchField == null)
            //{
            //    searchField = new SearchField();
            //}
            //Rect searchRect = GUILayoutUtility.GetRect(GUIContent.none, GUIStyle.none, GUILayout.ExpandWidth(true), GUILayout.Height(40));
            //string text = searchField.OnGUI(searchRect,searchText);
            //if(text!= searchText)
            //{
            //    searchText = text;
            //    searchResults.Clear();
            //    if(!string.IsNullOrEmpty(searchText))
            //    {
            //        for(int i =0;i<assetDatasProperty.arraySize;++i)
            //        {
            //            SerializedProperty dataProperty = assetDatasProperty.GetArrayElementAtIndex(i);
            //            string assetPath = dataProperty.FindPropertyRelative("assetPath").stringValue;
            //            if(assetPath.ToLower().IndexOf(searchText.ToLower()) >= 0)
            //            {
            //                searchResults.Add(dataProperty.Copy());
            //            }
            //        }
            //    }
            //}
            //foreach(var data in searchResults)
            //{
            //    EditorGUILayout.PropertyField(data,true);
            //}
        }
Esempio n. 3
0
        public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(target);

            serializedObject.Update();
            {
                scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
                {
                    EditorGUILayout.PropertyField(postTypeProperty);

                    EditorGUILayout.Space();

                    EditorGUILayout.PropertyField(filterProperty);

                    if (rulerRList == null)
                    {
                        rulerRList = new ReorderableList(serializedObject, rulerProperty, true, true, true, true);
                        rulerRList.drawElementCallback = (rect, index, isActive, isFocused) =>
                        {
                            SerializedProperty property = rulerProperty.GetArrayElementAtIndex(index);
                            EditorGUI.PropertyField(rect, property);
                        };
                        rulerRList.drawHeaderCallback = (rect) =>
                        {
                            EditorGUI.LabelField(rect, "Rulers");
                        };
                        rulerRList.onAddCallback = (list) =>
                        {
                            genericMenu.ShowAsContext();
                        };
                        rulerRList.onRemoveCallback = (list) =>
                        {
                            var removedObj = rulerProperty.GetArrayElementAtIndex(list.index).objectReferenceValue;
                            rulerProperty.RemoveElementAt(list.index);
                            if (removedObj != null)
                            {
                                AssetDatabase.RemoveObjectFromAsset(removedObj);
                                AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target));

                                EditorUtility.SetDirty(target);
                            }
                        };
                    }

                    EditorGUILayout.Space();

                    rulerRList.DoLayoutList();
                }
                EditorGUILayout.EndScrollView();
            }
            serializedObject.ApplyModifiedProperties();

            EditorGUILayout.Space();

            if (GUILayout.Button("Execute", GUILayout.Height(40)))
            {
                (target as AssetPostProcess).Process();
            }
        }
Esempio n. 4
0
 public override void OnInspectorGUI()
 {
     EGUILayout.DrawScript(target);
     serializedObject.Update();
     {
         EGUILayout.DrawAssetFolderSelection(targetFolderProperty, true);
     }
     serializedObject.ApplyModifiedProperties();
 }
        public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(target);
            DrawerSetting.OnDrawSetting();

            EGUI.BeginLabelWidth(GetLabelWidth());
            {
                drawerObject.OnGUILayout();
            }
            EGUI.EndLableWidth();
        }
        public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(target);

            serializedObject.Update();

            colorFolderRList.DoLayoutList();
            platformFolderRList.DoLayoutList();
            tagFolderRList.DoLayoutList();
            assetFolderRList.DoLayoutList();

            serializedObject.ApplyModifiedProperties();
        }
Esempio n. 7
0
        public override void OnInspectorGUI()
        {
            EGUILayout.DrawScript(nodeBehaviour);

            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
            {
                isBindNodeFoldout = EditorGUILayout.Foldout(isBindNodeFoldout, Contents.BindTitleContent, true);
                if (!isBindNodeFoldout)
                {
                    if (bindNodeRList == null)
                    {
                        bindNodeRList = CreateRList(Contents.BindTitleContent, NodeType.BindNode, bindNodes);
                    }
                    bindNodeRList.DoLayoutList();
                }

                isBoneNodeFoldout = EditorGUILayout.Foldout(isBoneNodeFoldout, Contents.BoneTitleContent, true);
                if (!isBoneNodeFoldout)
                {
                    if (boneNodeRList == null)
                    {
                        boneNodeRList = CreateRList(Contents.BoneTitleContent, NodeType.BoneNode, boneNodes);
                    }
                    boneNodeRList.DoLayoutList();
                }

                isRendererNodeFoldout = EditorGUILayout.Foldout(isRendererNodeFoldout, Contents.RendererTitleContent, true);
                if (!isRendererNodeFoldout)
                {
                    if (smRendererNodeRList == null)
                    {
                        smRendererNodeRList = CreateRList(Contents.RendererTitleContent, NodeType.SMRendererNode, smRendererNodes);
                    }
                    smRendererNodeRList.DoLayoutList();
                }
            }
            EditorGUILayout.EndScrollView();
            if (GUI.changed)
            {
                nodeBehaviour.bindNodes       = bindNodes.ToArray();
                nodeBehaviour.boneNodes       = boneNodes.ToArray();
                nodeBehaviour.smRendererNodes = smRendererNodes.ToArray();

                EditorUtility.SetDirty(target);
            }
        }
Esempio n. 8
0
 public override void OnInspectorGUI()
 {
     EGUILayout.DrawScript(target);
     ruler.Platform = EGUILayout.StringPopup("Platform", ruler.Platform, PlatformContents);
     ruler.MaxSize  = EGUILayout.DrawPopup <int>("MaxSize", MaxSizeContents, MaxSizeValues, ruler.MaxSize);
     if (ruler.Platform == PlatformContents[0])
     {
         ruler.Format = EGUILayout.DrawPopup <int>("Format", StandaloneFormatContents, StandaloneFormatValues, ruler.Format);
     }
     else if (ruler.Platform == PlatformContents[1])
     {
         ruler.Format = EGUILayout.DrawPopup <int>("Format", AndroidFormatContents, AndroidFormatValues, ruler.Format);
     }
     else if (ruler.Platform == PlatformContents[2])
     {
         ruler.Format = EGUILayout.DrawPopup <int>("Format", iPhoneFormatContents, iPhoneFormatValues, ruler.Format);
     }
 }
Esempio n. 9
0
        public override void OnInspectorGUI()
        {
            if (attr != null)
            {
                EGUILayout.DrawScript(target);
                DrawerSetting.OnDrawSetting();

                EGUI.BeginLabelWidth(attr.LabelWidth);
                {
                    drawerObject.OnGUILayout();
                }
                EGUI.EndLableWidth();
            }
            else
            {
                base.OnInspectorGUI();
            }
        }