|
|
@ -5,13 +5,10 @@ using UnityEngine; |
|
|
|
namespace Tools.ExcelResolver.Editor |
|
|
|
namespace Tools.ExcelResolver.Editor |
|
|
|
{ |
|
|
|
{ |
|
|
|
[InlineEditor(InlineEditorObjectFieldModes.CompletelyHidden)] |
|
|
|
[InlineEditor(InlineEditorObjectFieldModes.CompletelyHidden)] |
|
|
|
// [CreateAssetMenu(fileName = "ExcelResolverEditorConfig", menuName = "ExcelResolver/ExcelResolverEditorConfig")] |
|
|
|
|
|
|
|
public sealed class ExcelResolverEditorConfig : ScriptableObject |
|
|
|
public sealed class ExcelResolverEditorConfig : ScriptableObject |
|
|
|
{ |
|
|
|
{ |
|
|
|
[LabelText("Excel路径"), FolderPath] |
|
|
|
[LabelText("Excel路径"), FolderPath] |
|
|
|
public string ExcelPathRoot = "Assets/ExcelResolver/Excel"; |
|
|
|
public string ExcelPathRoot = "Assets/ExcelResolver/Excel"; |
|
|
|
[LabelText("Json路径"), ValueDropdown("@Tools.Editor.DirectoryUtil.GetFilePaths()")] |
|
|
|
|
|
|
|
public string JsonPathRoot = "Assets/ExcelResolver/Json"; |
|
|
|
|
|
|
|
[LabelText("C#代码路径"), ValueDropdown("@Tools.Editor.DirectoryUtil.GetFilePaths()")] |
|
|
|
[LabelText("C#代码路径"), ValueDropdown("@Tools.Editor.DirectoryUtil.GetFilePaths()")] |
|
|
|
public string CodePathRoot = "Assets/Scripts/Generator/Excel"; |
|
|
|
public string CodePathRoot = "Assets/Scripts/Generator/Excel"; |
|
|
|
[LabelText("SO存放路径"), ValueDropdown("@Tools.Editor.DirectoryUtil.GetFilePaths()")] |
|
|
|
[LabelText("SO存放路径"), ValueDropdown("@Tools.Editor.DirectoryUtil.GetFilePaths()")] |
|
|
@ -19,12 +16,9 @@ namespace Tools.ExcelResolver.Editor |
|
|
|
[LabelText("生成代码命名空间")] |
|
|
|
[LabelText("生成代码命名空间")] |
|
|
|
public string GenerateDataClassNameSpace = "Tools.ExcelResolver"; |
|
|
|
public string GenerateDataClassNameSpace = "Tools.ExcelResolver"; |
|
|
|
|
|
|
|
|
|
|
|
[HideInInspector] public bool isInit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void MakeSureDirectory() |
|
|
|
public void MakeSureDirectory() |
|
|
|
{ |
|
|
|
{ |
|
|
|
DirectoryUtil.MakeSureDirectory(ExcelPathRoot); |
|
|
|
DirectoryUtil.MakeSureDirectory(ExcelPathRoot); |
|
|
|
DirectoryUtil.MakeSureDirectory(JsonPathRoot); |
|
|
|
|
|
|
|
DirectoryUtil.MakeSureDirectory(SOPathRoot); |
|
|
|
DirectoryUtil.MakeSureDirectory(SOPathRoot); |
|
|
|
DirectoryUtil.MakeSureDirectory(CodePathRoot); |
|
|
|
DirectoryUtil.MakeSureDirectory(CodePathRoot); |
|
|
|
} |
|
|
|
} |
|
|
|