111
This commit is contained in:
@@ -34,19 +34,24 @@ namespace Stary.Evo.TableTextConversion
|
|||||||
// 转化表的名称
|
// 转化表的名称
|
||||||
private static string newDataName;
|
private static string newDataName;
|
||||||
|
|
||||||
|
[MenuItem("Evo/Utility/PlayerPrefsClear")]
|
||||||
|
private static void PlayerPrefsClear()
|
||||||
|
{
|
||||||
|
PlayerPrefs.DeleteAll();
|
||||||
|
EditorPrefs.DeleteAll();
|
||||||
|
}
|
||||||
|
|
||||||
[MenuItem("Evo/Exsl配置表/信息表转换")]
|
[MenuItem("Evo/Exsl配置表/信息表转换")]
|
||||||
static void ShowWindows()
|
static void ShowWindows()
|
||||||
{
|
{
|
||||||
window = (ConvertedExslDataMessage)EditorWindow.GetWindow(typeof(ConvertedExslDataMessage));
|
window = (ConvertedExslDataMessage)EditorWindow.GetWindow(typeof(ConvertedExslDataMessage));
|
||||||
|
// 添加空值检查,确保selectedDomainNames不会为null
|
||||||
|
window.selectedDomainNames = EditorPrefs.GetString("CurrentModulesName", "");
|
||||||
|
window.configurationFileType = (ConfigurationFileType)Enum.Parse(typeof(ConfigurationFileType),
|
||||||
|
EditorPrefs.GetString("ConfigurationFileType"));
|
||||||
window.Show();
|
window.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
configurationFileType = (ConfigurationFileType)Enum.Parse(typeof(ConfigurationFileType),
|
|
||||||
EditorPrefs.GetString("ConfigurationFileType"));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Title("转化配置的Exsl文件:", titleAlignment: TitleAlignments.Centered)]
|
[Title("转化配置的Exsl文件:", titleAlignment: TitleAlignments.Centered)]
|
||||||
[HorizontalGroup("BuildPipeline"), HideLabel]
|
[HorizontalGroup("BuildPipeline"), HideLabel]
|
||||||
@@ -471,7 +476,7 @@ namespace Stary.Evo.TableTextConversion
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
domains = Array.Empty<string>();
|
domains = new[] { "Default" };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configurationFileType == ConfigurationFileType.Asset)
|
if (configurationFileType == ConfigurationFileType.Asset)
|
||||||
@@ -491,12 +496,14 @@ namespace Stary.Evo.TableTextConversion
|
|||||||
if (configurationFileType == ConfigurationFileType.Asset)
|
if (configurationFileType == ConfigurationFileType.Asset)
|
||||||
{
|
{
|
||||||
Assetpath = Application.dataPath + "/Domain/" + newValue + "/AddressableRes/Config/";
|
Assetpath = Application.dataPath + "/Domain/" + newValue + "/AddressableRes/Config/";
|
||||||
EditorPrefs.SetString("CurrentDomainName", newValue);
|
string valueToSave = string.IsNullOrEmpty(selectedDomainNames) ? "" : selectedDomainNames;
|
||||||
|
EditorPrefs.SetString("CurrentDomainName", valueToSave);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Assetpath = Application.dataPath + "/Modules/" + newValue + "/Main/Res/Config/";
|
Assetpath = Application.dataPath + "/Modules/" + newValue + "/Main/Res/Config/";
|
||||||
EditorPrefs.SetString("CurrentModulesName", newValue);
|
string valueToSave = string.IsNullOrEmpty(selectedDomainNames) ? "" : selectedDomainNames;
|
||||||
|
EditorPrefs.SetString("CurrentModulesName", valueToSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Directory.Exists(Assetpath))
|
if (!Directory.Exists(Assetpath))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.staryevo.tabletextconversion",
|
"name": "com.staryevo.tabletextconversion",
|
||||||
"version": "2.0.6",
|
"version": "2.0.7",
|
||||||
"displayName": "05.TableTextConversion",
|
"displayName": "05.TableTextConversion",
|
||||||
"description": "表格转化工具",
|
"description": "表格转化工具",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user