Example #1
0
        public static void RemoveStageIcon(int id)
        {
            string filename = stageIconRoot + id + ".png";

            if (File.Exists(filename))
            {
                File.Delete(filename);
            }
            AssetDatabase.Refresh();

            WarEditor_StageWindow.RefreshStageIcon(id);
        }
Example #2
0
        public static void SaveStateIcon()
        {
            PathUtil.CheckPath(stageIconRoot, false);
            string filename = stageIconRoot + War.sceneData.id + ".png";

            ScreenshotTool.Shot(Camera.main, 300, 200, false, filename);

            string file_1920x1280 = Application.dataPath + "/../../../document/策划案/关卡截图/" + War.sceneData.id + ".png";

            PathUtil.CheckPath(file_1920x1280, true);
            ScreenshotTool.Shot(Camera.main, 1920, 1280, false, file_1920x1280);

            AssetDatabase.Refresh();

            WarEditor_StageWindow.RefreshStageIcon(War.sceneData.id);
        }
 static void Init()
 {
     window         = EditorWindow.GetWindow <WarEditor_StageWindow>("关卡浏览器");
     window.minSize = new Vector2(500, 200);
     window.Show();
 }