コード例 #1
0
        public override void DoGUI()
        {
            ExGUI.Title("GUID -> Path");
            EditorGUI.BeginChangeCheck();
            _guid[0] = EditorGUILayout.TextField("GUID", _guid[0]);
            if (EditorGUI.EndChangeCheck())
            {
                _path[0] = AssetDatabase.GUIDToAssetPath(_guid[0]);
            }
            EditorGUILayout.TextField("Path", _path[0]);



            ExGUI.Title("Path -> GUID");
            EditorGUI.BeginChangeCheck();
            _path[1] = EditorGUILayout.TextField("GUID", _path[1]);
            if (EditorGUI.EndChangeCheck())
            {
                _guid[1] = AssetDatabase.AssetPathToGUID(_path[1]);
            }

            EditorGUILayout.TextField("GUID", _guid[1]);


            ExGUI.Title("Object -> GUID");

            EditorGUI.BeginChangeCheck();
            _obj = (UnityEngine.Object)EditorGUILayout.ObjectField("Obj", _obj, typeof(UnityEngine.Object), false);
            if (EditorGUI.EndChangeCheck())
            {
                _guid[2] = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(_obj));
            }
            EditorGUILayout.TextField("GUID", _guid[2]);
        }
        void DrawManageStyles()
        {
            if (roorderList == null && _skinOriginal != null)
            {
                EnableList();
            }
            if (roorderList == null)
            {
                return;
            }

            ExGUI.Title("Add Buildt In Styles");
            DrawAddDefault();

            ExGUI.Title("Reorder");
            ExGUI.Horizontal(delegate()
            {
                script = (MonoScript)EditorGUILayout.ObjectField(script, typeof(MonoScript), false);
                if (GUILayout.Button("ReOrder", EditorStyles.miniButtonLeft))
                {
                    try
                    {
                        ReorderByEnum(script.GetClass());
                    }
                    catch (System.Exception ex)
                    {
                        Debug.Log(ex);
                    }
                }
                if (GUILayout.Button("Add From Enum", EditorStyles.miniButtonRight))
                {
                    try
                    {
                        AddFromEnum(script.GetClass());
                    }
                    catch (System.Exception ex)
                    {
                        Debug.Log(ex);
                    }
                }
            });


            EditorGUILayout.Space();
            roorderList.DoLayoutList();
        }