static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard("Export OBJ", typeof(OBJExporter), "Export");
 }
示例#2
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard("Replace GameObjects", typeof(ReplaceGameObjects), "Replace");
 }
示例#3
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <TextureArrayWizard> (
         "Create Texture Array", "Create"
         );
 }
示例#4
0
 public static UTreeWizard GetWizard(string title, string createButtonName, string otherButtonName)
 {
     return(ScriptableWizard.DisplayWizard <UTreeWizard>(title, createButtonName, otherButtonName));
 }
示例#5
0
 static void CreateWindow()
 {
     ScriptableWizard.DisplayWizard("Random Object Map", typeof(RandomObjectMap), "Distribute objects");
 }
示例#6
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <EditorCheckTexture>("检查图片", "CheckIamge");
 }
 public static void ShowWindow()
 {
     ScriptableWizard.DisplayWizard <LegacyParticleUpdater>("Upgrade Legacy Particles v" + kVersion, "Upgrade Selected", "Upgrade Everything");
 }
        private void OnGUI()
        {
            using (EditorOneBuild.EditorLocalizationValues.BeginScope())
            {
                GUIBuildSettigns();

                using (new GUILayout.HorizontalScope())
                {
                    if (GUILayout.Button("Open Project Settings".Localization()))
                    {
                        //EditorApplication.ExecuteMenuItem("Edit/Project Settings.../Player");
                        SettingsService.OpenProjectSettings("Project/Player");
                        // Selection.activeObject = Unsupported.GetSerializedAssetInterfaceSingleton("PlayerSettings");
                    }
                    if (GUILayout.Button("Load Settings".Localization()))
                    {
                        EditorOneBuild.UpdateConfig();
                    }
                    if (GUILayout.Button("Build".Localization()))
                    {
                        if (Event.current.shift)
                        {
                            var options = EditorOneBuild.CreateBuildOptions();
                            options.versionName = UserBuildSettings.AvalibleVersionName;
                            options.isPreBuild  = true;
                            EditorOneBuild.Build(options);
                        }
                        else
                        {
                            EditorOneBuild.Build(UserBuildSettings.AvalibleVersionName);
                        }
                    }
                }

                using (new GUILayout.HorizontalScope())
                {
                    var style = new GUIStyle(EditorStyles.largeLabel);
                    style.fontSize += 4;
                    style.padding   = new RectOffset(5, 0, 1, 0);
                    style.margin    = new RectOffset();
                    if (GUILayout.Button("↻", style, GUILayout.ExpandWidth(false)))
                    {
                        Refresh();
                    }

                    int selectedIndex = configPaths.IndexOf(selectedPath);
                    int newIndex      = EditorGUILayout.Popup(selectedIndex, displayPaths);
                    if (newIndex != selectedIndex)
                    {
                        Select(configPaths[newIndex]);
                    }

                    EditorGUILayoutx.PingButton(selectedPath);

                    if (GUILayout.Button("New Config".Localization(), GUILayout.ExpandWidth(false)))
                    {
                        var wizard = ScriptableWizard.DisplayWizard <CreateBuildConfigWizard>("Create Build Config");
                        wizard.callback = (path) =>
                        {
                            if (path != null)
                            {
                                path = path.ReplacePathSeparator();
                                GUIUtility.keyboardControl = -1;
                                Refresh();

                                string newPath = null;

                                for (int i = 0; i < configPaths.Count; i++)
                                {
                                    if (configPaths[i].Equals(path, StringComparison.InvariantCultureIgnoreCase))
                                    {
                                        newPath = configPaths[i];
                                        break;
                                    }
                                }
                                Select(path);
                            }
                        };
                    }
                }


                if (doc == null)
                {
                    return;
                }

                using (var sv = new GUILayout.ScrollViewScope(scrollPos))
                {
                    scrollPos = sv.scrollPosition;

                    using (var checker = new EditorGUI.ChangeCheckScope())
                    {
                        float oldWidth = EditorGUIUtility.labelWidth;
                        EditorGUIUtility.labelWidth = Mathf.Max(EditorGUIUtility.labelWidth, Screen.width * 0.3f);

                        foreach (XmlElement typeNode in doc.DocumentElement.SelectNodes("ns:Type", nsMgr))
                        {
                            DrawTypeNode(typeNode);
                        }
                        EditorGUIUtility.labelWidth = oldWidth;

                        if (checker.changed)
                        {
                            DirtyConfig();
                        }
                    }



                    using (new GUILayout.HorizontalScope())
                    {
                        if (doc != null)
                        {
                            if (GUILayout.Button("Add Type...", "popup"))
                            {
                                GenericMenu menu = new GenericMenu();
                                configTypes.Where(item =>
                                {
                                    Type configType = item.Key;
                                    if (!ContainsType(configType.FullName))
                                    {
                                        menu.AddItem(new GUIContent(configType.FullName), false, () =>
                                        {
                                            AddType(configType, item.Value);
                                        });
                                    }
                                    return(false);
                                }).ToArray();
                                menu.ShowAsContext();
                            }
                        }
                    }
                }
            }
        }
    static void CreateWizard()
    {
        var replaceGameObjects = ScriptableWizard.DisplayWizard <ReplaceGameObjects>("Replace GameObjects", "Replace");

        replaceGameObjects.OldObjects = Selection.gameObjects;
    }
示例#10
0
 static void Creat()
 {
     SettingSelector settingSelector = ScriptableWizard.DisplayWizard <SettingSelector>("Choose Settings");
 }
示例#11
0
 static void MakeBillboard()
 {
     ScriptableWizard.DisplayWizard <GenerateBillboard>(
         "Make Billboard from object", "Create");
 }
示例#12
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard("Batch Rename", typeof(BatchRename), "Rename");
 }
示例#13
0
    static void BuildSpriteAtlases()
    {
        BuildAtlases ba = (BuildAtlases)ScriptableWizard.DisplayWizard("Build Atlases", typeof(BuildAtlases));

        ba.LoadSettings();
    }
示例#14
0
 static void Replace()
 {
     ScriptableWizard.DisplayWizard("Import Splatmap", typeof(ImportSplatmap), "Import");
 }
示例#15
0
 static void RenderCubemap()
 {
     ScriptableWizard.DisplayWizard <RenderCubemapWizard>("Render cubemap", "Render!");
 }
示例#16
0
 static void CreateTree()
 {
     ScriptableWizard.DisplayWizard <OcTreeCreateWizard>("从选中物体创建OcTree");
 }
示例#17
0
    static void CreateWizard()
    {
        SOEventWizard wizard = ScriptableWizard.DisplayWizard <SOEventWizard>("ScriptableObject Event Creation Wizard", "Create");

        wizard.AssetPath = WizardTools.GetSelectedPath();
    }
示例#18
0
        public static void CreateWizard(Object[] objects)
        {
            EditImportSettings w = ScriptableWizard.DisplayWizard <EditImportSettings>("Adjust Import Settings", "Adjust");

            w.objects = objects;
        }
示例#19
0
        static void CreateWizard()
        {
            DragonBoneArmatureEditor editor = ScriptableWizard.DisplayWizard <DragonBoneArmatureEditor>("Create DragonBone", "Create");

            editor.minSize = new Vector2(200, 500);
            if (Selection.activeObject != null)
            {
                string dirPath = AssetDatabase.GetAssetOrScenePath(Selection.activeObject);
                if (File.Exists(dirPath))
                {
                    dirPath = dirPath.Substring(0, dirPath.LastIndexOf("/"));
                }
                if (Directory.Exists(dirPath))
                {
                    string animJsonPath = null;
                    Dictionary <string, string> texturePathKV     = new Dictionary <string, string>();
                    Dictionary <string, string> textureJsonPathKV = new Dictionary <string, string>();
                    foreach (string path in Directory.GetFiles(dirPath))
                    {
                        if (path.LastIndexOf(".meta") == -1)
                        {
                            if (System.IO.Path.GetExtension(path) == ".json" && (path.IndexOf("_tex") > -1 || path.IndexOf("texture") > -1))
                            {
                                int start = path.LastIndexOf("/") + 1;
                                int end   = path.LastIndexOf(".json");
                                textureJsonPathKV[path.Substring(start, end - start)] = path;
                                continue;
                            }
                            if (System.IO.Path.GetExtension(path) == ".png" && (path.IndexOf("_tex") > -1 || path.IndexOf("texture") > -1))
                            {
                                int start = path.LastIndexOf("/") + 1;
                                int end   = path.LastIndexOf(".png");
                                texturePathKV[path.Substring(start, end - start)] = path;
                                continue;
                            }
                            if (System.IO.Path.GetExtension(path) == ".json" && (path.IndexOf("_ske") > -1 || path.IndexOf("texture.json") == -1))
                            {
                                animJsonPath = path;
                            }
                        }
                    }

                    if (!string.IsNullOrEmpty(animJsonPath))
                    {
                        editor.animTextAsset = AssetDatabase.LoadAssetAtPath <TextAsset>(animJsonPath);
                    }

                    if (texturePathKV.Count > 0 && textureJsonPathKV.Count > 0)
                    {
                        List <Atlas> atlasList = new List <Atlas>();
                        foreach (string name in texturePathKV.Keys)
                        {
                            if (textureJsonPathKV.ContainsKey(name))
                            {
                                if (editor.altasTexture == null)
                                {
                                    editor.altasTextAsset = AssetDatabase.LoadAssetAtPath <TextAsset>(textureJsonPathKV[name]);
                                    editor.altasTexture   = AssetDatabase.LoadAssetAtPath <Texture2D>(texturePathKV[name]);
                                }
                                else
                                {
                                    Atlas atlas = new Atlas();
                                    atlas.atlasText = AssetDatabase.LoadAssetAtPath <TextAsset>(textureJsonPathKV[name]);
                                    atlas.texture   = AssetDatabase.LoadAssetAtPath <Texture2D>(texturePathKV[name]);
                                    atlasList.Add(atlas);
                                }
                            }
                        }
                        editor.otherTextures = atlasList.ToArray();
                    }
                }
            }
        }
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <BoneMeshEraserWizard>("BoneMeshEraser", "Erase triangles by bone", "Erase");
 }
示例#21
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard("Create Cone", typeof(CreateCone));
 }
示例#22
0
 static void FindMenuItem()
 {
     ScriptableWizard.DisplayWizard("Find", typeof(FindObjects), "", "Find");
 }
示例#23
0
 static void Export()
 {
     ScriptableWizard.DisplayWizard("Export to J3D", typeof(J3DExport), "Export");
 }
示例#24
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <WizardCreateLight>("Create Light", "Create", "Apply");
     //If you don't want to use the secondary button simply leave it out:
     //ScriptableWizard.DisplayWizard<WizardCreateLight>("Create Light", "Create");
 }
示例#25
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard(
         "Replace Selection", typeof(ReplaceSelection), "Replace");
 }
示例#26
0
 public static void CreateLevelAsset()
 {
     ScriptableWizard.DisplayWizard <AudioEventWizard>("Enter name new Audio event database", "Create");
 }
示例#27
0
 static public void Open()
 {
     ScriptableWizard.DisplayWizard <ExportPNG>("导出PNG", "导出PNG");
 }
示例#28
0
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <NewGameWizard>("New Game Wizard", "Create");
 }
示例#29
0
 static void FindItem()
 {
     ScriptableWizard.DisplayWizard <InvFindItem>("Find Item");
 }
 static void CreateWizard()
 {
     ScriptableWizard.DisplayWizard <MeshCombinerWizard>("Mesh Combiner", "Close", "Combine");
 }