HAARFTE/Assets/DemoGame/GameScript/Editor/GenConstStrEditor.cs

35 lines
760 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.IO;
using System.Text;
using Sirenix.OdinInspector.Editor;
using UnityEditor;
using UnityEngine.Device;
namespace ZEditor
{
public class GenConstStrEditor : OdinEditorWindow
{
[MenuItem("HAARFTE/GenConstStrEditor")]
static void ShowWindow()
{
GetWindow<GenConstStrEditor>().Show();
}
public List<string> list = new List<string>();
void Save()
{
StringBuilder sb = new StringBuilder();
foreach (var str in list)
{
sb.AppendLine($"public static string {str} = \"{str}\";");
}
}
}
//
// class ConstInfo
// {
// public string str;
// }
}