This commit is contained in:
2025-11-12 15:03:21 +08:00
parent cedcbee5e8
commit a38950b4b1
2 changed files with 17 additions and 10 deletions

View File

@@ -34,19 +34,24 @@ namespace Stary.Evo.TableTextConversion
// 转化表的名称
private static string newDataName;
[MenuItem("Evo/Utility/PlayerPrefsClear")]
private static void PlayerPrefsClear()
{
PlayerPrefs.DeleteAll();
EditorPrefs.DeleteAll();
}
[MenuItem("Evo/Exsl配置表/信息表转换")]
static void ShowWindows()
{
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();
}
protected override void Initialize()
{
base.Initialize();
configurationFileType = (ConfigurationFileType)Enum.Parse(typeof(ConfigurationFileType),
EditorPrefs.GetString("ConfigurationFileType"));
}
[Title("转化配置的Exsl文件", titleAlignment: TitleAlignments.Centered)]
[HorizontalGroup("BuildPipeline"), HideLabel]
@@ -471,7 +476,7 @@ namespace Stary.Evo.TableTextConversion
}
else
{
domains = Array.Empty<string>();
domains = new[] { "Default" };
}
if (configurationFileType == ConfigurationFileType.Asset)
@@ -491,12 +496,14 @@ namespace Stary.Evo.TableTextConversion
if (configurationFileType == ConfigurationFileType.Asset)
{
Assetpath = Application.dataPath + "/Domain/" + newValue + "/AddressableRes/Config/";
EditorPrefs.SetString("CurrentDomainName", newValue);
string valueToSave = string.IsNullOrEmpty(selectedDomainNames) ? "" : selectedDomainNames;
EditorPrefs.SetString("CurrentDomainName", valueToSave);
}
else
{
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))