summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-06-27 21:11:26 +0800
committerchai <215380520@qq.com>2023-06-27 21:11:26 +0800
commitf5eee69c3cce031a82edc1de49966c4d9ca80985 (patch)
tree27455b96782a12e500d7b6e3c89d008496f173eb /WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs
parent411470e66bcfd9631c7b6f82b0a00e5e1e1b0004 (diff)
*misc
Diffstat (limited to 'WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs')
-rw-r--r--WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs54
1 files changed, 0 insertions, 54 deletions
diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs b/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs
deleted file mode 100644
index b9609a5..0000000
--- a/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using LitJson;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEditor;
-using UnityEngine;
-using WK;
-using WK.Data;
-
-public class LevelEditor : EditorWindow
-{
-
- private static LevelEditor s_LevelEditorWindow;
-
- private string m_StageOutFile = "Assets/Bundle/stages/";
-
- [MenuItem("Tools/¹Ø¿¨±à¼­Æ÷/Open")]
- public static void OpenLevelEditor()
- {
- s_LevelEditorWindow = GetWindow<LevelEditor>();
- }
-
- private void OnGUI()
- {
- m_StageOutFile = GUILayout.TextField(m_StageOutFile);
-
- if(GUILayout.Button("ÐòÁл¯"))
- {
- StageMetadata stageMetadata = new StageMetadata();
-
- StageEntityBase[] entites = GameObject.FindObjectsOfType<StageEntityBase>();
- if(entites != null && entites.Length > 0)
- {
- for(int i = 0; i < entites.Length; ++i)
- {
- StageEntityBase entity = entites[i];
- if (entity == null)
- continue;
- GameObject go = entity.gameObject;
- if (go.name.StartsWith("~"))
- continue;
- var meta = entity.OnSerialize();
- if(meta != null)
- {
- stageMetadata.Write(meta);
- }
- }
- }
-
- string json = JsonMapper.ToJson(stageMetadata);
- CommonFunction.WriteFile(json, m_StageOutFile);
- }
- }
-
-}