上传框架,上传unitask
This commit is contained in:
@@ -69,6 +69,7 @@ namespace Stary.Evo.Editor
|
||||
public static string packageName;
|
||||
#region HyBridCLRBuild
|
||||
|
||||
[HideIf("@ packageName== \"Main\"")]
|
||||
[Title("HyBridCLRBuild", titleAlignment: TitleAlignments.Centered)] [HideLabel]
|
||||
public BuildAssetEntity hyBridClrBuildEntity =
|
||||
new BuildAssetEntity("HyBridCLRBuild", "DllBuildTarget", () =>
|
||||
@@ -168,11 +169,12 @@ namespace Stary.Evo.Editor
|
||||
[InfoBox("服务器资源盘位未存在", InfoMessageType.Error, "@ _isCheckDriveExist==false")]
|
||||
[InfoBox("1、映射网络驱动器\n2、添加http://192.168.31.100:5005/alist/HotRefresh地址\n3、设置盘符为Z盘", InfoMessageType.Info,
|
||||
"@ _isCheckDriveExist==false")]
|
||||
[HideIf("@ selectedPackageNames==\"Main\"")]
|
||||
public string updateServerPath;
|
||||
|
||||
private bool _isCheckDriveExist;
|
||||
|
||||
[TitleGroup("UpdateAssetButton", alignment: TitleAlignments.Centered)] [HideLabel][ShowIf("@ _isCheckDriveExist&&BuildAssetDataSetting.environmentType== EnvironmentType.Release",true)]
|
||||
[TitleGroup("UpdateAssetButton", alignment: TitleAlignments.Centered)] [HideLabel][ShowIf("@ _isCheckDriveExist&&BuildAssetDataSetting.environmentType== EnvironmentType.Release&&selectedPackageNames!=\"Main\"")]
|
||||
public BuildAssetEntity onUpdateBuildPipelineEntity;
|
||||
|
||||
|
||||
@@ -185,6 +187,7 @@ namespace Stary.Evo.Editor
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Debug.LogWarning("[Build] 打包已经取消");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public BuiltinBuildPipelineViewer(BuildAssetDataSetting packageName) : base(packageName)
|
||||
{
|
||||
// isSimulate = false;
|
||||
}
|
||||
|
||||
public override void ExecuteBuild()
|
||||
@@ -42,8 +43,12 @@ namespace Stary.Evo.Editor
|
||||
BuiltinBuildPipeline pipeline = new BuiltinBuildPipeline();
|
||||
var buildResult = pipeline.Run(buildParameters, true);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
EditorUtility.RevealInFinder(buildResult.OutputPackageDirectory);
|
||||
base.ExecuteBuild();
|
||||
base.ExecuteBuild();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,20 +31,50 @@ namespace Stary.Evo.Editor
|
||||
[Button("创建Domain", ButtonSizes.Large)]
|
||||
public async void CreatDomain()
|
||||
{
|
||||
if (GetCreatDomainAll().Count>0)
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误!", "Domain仅可以创建一个,请在下方删除存在的Domain", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
// if (GetCreatDomainAll().Count>0)
|
||||
// {
|
||||
// EditorUtility.DisplayDialog("错误!", "Domain仅可以创建一个,请在下方删除存在的Domain", "确定");
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (string.IsNullOrEmpty(domain))
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误!", "请输入将要创建Domain的编号", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
string artDomainPath = $"{Application.dataPath}/Art/{domain}";
|
||||
if (!Directory.Exists(artDomainPath))
|
||||
{
|
||||
Directory.CreateDirectory(artDomainPath);
|
||||
|
||||
//创建Animation文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Animation");
|
||||
//创建Effects文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Effects");
|
||||
//创建Fbx文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Fbx");
|
||||
//创建Font文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Font");
|
||||
//创建Materials文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Materials");
|
||||
//创建Prefabs文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Prefabs");
|
||||
//创建Scenes文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Scenes");
|
||||
//创建/Scenes/Test文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Scenes/Test");
|
||||
//创建Shader文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Shader");
|
||||
//创建Textures文件夹
|
||||
Directory.CreateDirectory(artDomainPath + "/Textures");
|
||||
await File.WriteAllTextAsync(
|
||||
$"{artDomainPath}/这里放所有美术的资源,因涉及打包依赖等原因,不建议在上一层节点新增文件夹,如涉及文件夹规范等问题请@张铮.hint", "");
|
||||
}
|
||||
|
||||
|
||||
string domainPath = $"{Application.dataPath}/Domain/{domain}";
|
||||
if (Directory.Exists(domainPath+"/AddressableRes/Config/DomainConfig.asset"))
|
||||
if (Directory.Exists(domainPath + "/AddressableRes/Config/DomainConfig.asset"))
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误!", $"\"{domain}\"已经存在,无法创建", "确定");
|
||||
return;
|
||||
@@ -52,7 +82,7 @@ namespace Stary.Evo.Editor
|
||||
|
||||
Directory.CreateDirectory(domainPath);
|
||||
|
||||
//美术资源存放文件夹
|
||||
//程序资源存放文件夹
|
||||
string resPath = $"{domainPath}/AddressableRes";
|
||||
Directory.CreateDirectory(resPath);
|
||||
//创建音频文件夹
|
||||
@@ -152,32 +182,34 @@ namespace Stary.Evo.Editor
|
||||
string configPath = $"Assets/Domain/{domain}/HotUpdate/{hotfixDomain}.asmdef";
|
||||
AssemblyDefinitionAsset assemblyDefinitionAsset =
|
||||
AssetDatabase.LoadAssetAtPath<AssemblyDefinitionAsset>(configPath);
|
||||
// 将程序集定义添加到 HybridCLR 热更列表
|
||||
var settings = SettingsUtil.HybridCLRSettings;
|
||||
if (!settings.hotUpdateAssemblyDefinitions.Contains(assemblyDefinitionAsset))
|
||||
if (domain != "Main")
|
||||
{
|
||||
var assemblyList = settings.hotUpdateAssemblyDefinitions.ToList();
|
||||
assemblyList.Add(assemblyDefinitionAsset);
|
||||
SettingsUtil.HybridCLRSettings.hotUpdateAssemblyDefinitions = assemblyList.ToArray();
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<AssemblyDefinitionAsset> assemblies = new List<AssemblyDefinitionAsset>();
|
||||
for (int i = 0; i < settings.hotUpdateAssemblyDefinitions.Length; i++)
|
||||
{
|
||||
if (settings.hotUpdateAssemblyDefinitions[i] != null)
|
||||
// 将程序集定义添加到 HybridCLR 热更列表
|
||||
var settings = SettingsUtil.HybridCLRSettings;
|
||||
if (!settings.hotUpdateAssemblyDefinitions.Contains(assemblyDefinitionAsset))
|
||||
{
|
||||
assemblies.Add(settings.hotUpdateAssemblyDefinitions[i]);
|
||||
var assemblyList = settings.hotUpdateAssemblyDefinitions.ToList();
|
||||
assemblyList.Add(assemblyDefinitionAsset);
|
||||
SettingsUtil.HybridCLRSettings.hotUpdateAssemblyDefinitions = assemblyList.ToArray();
|
||||
}
|
||||
|
||||
|
||||
List<AssemblyDefinitionAsset> assemblies = new List<AssemblyDefinitionAsset>();
|
||||
for (int i = 0; i < settings.hotUpdateAssemblyDefinitions.Length; i++)
|
||||
{
|
||||
if (settings.hotUpdateAssemblyDefinitions[i] != null)
|
||||
{
|
||||
assemblies.Add(settings.hotUpdateAssemblyDefinitions[i]);
|
||||
}
|
||||
}
|
||||
|
||||
HybridCLRSettings.Instance.hotUpdateAssemblyDefinitions = assemblies.ToArray();
|
||||
HybridCLRSettings.Save();
|
||||
}
|
||||
|
||||
HybridCLRSettings.Instance.hotUpdateAssemblyDefinitions = assemblies.ToArray();
|
||||
HybridCLRSettings.Save();
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
|
||||
|
||||
|
||||
string domainClassPath = $"{scriptsPath}/{domainClassName}.cs";
|
||||
//await File.WriteAllTextAsync($"{scriptsPath}/{domainClassName}.cs", domainTemplate);
|
||||
await using (var writer = new StreamWriter(domainClassPath))
|
||||
@@ -186,7 +218,8 @@ namespace Stary.Evo.Editor
|
||||
domainTemplate = domainTemplate.Replace("ClassNameXX", domainClassName)
|
||||
.Replace("ReturnArchitecture", architectureClassName)
|
||||
.Replace("ArchitectureX", architectureClassName)
|
||||
.Replace("NamespaceX", domain);
|
||||
.Replace("NamespaceX", domain)
|
||||
.Replace("DomainNameXX", domain);
|
||||
await writer.WriteAsync(domainTemplate);
|
||||
}
|
||||
}
|
||||
@@ -206,6 +239,7 @@ namespace Stary.Evo.Editor
|
||||
base.Initialize();
|
||||
domainList = GetCreatDomainAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全部作用域
|
||||
/// </summary>
|
||||
@@ -227,10 +261,10 @@ namespace Stary.Evo.Editor
|
||||
domains = Array.Empty<string>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return domains;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全部作用域
|
||||
/// </summary>
|
||||
|
||||
@@ -25,6 +25,11 @@ namespace Stary.Evo.Editor
|
||||
[Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)]
|
||||
public void CloseDomain()
|
||||
{
|
||||
if (DomainName == "Main")
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "主包Main作用域无法删除", "确定");
|
||||
return;
|
||||
}
|
||||
bool isOk = EditorUtility.DisplayDialog("提示", "是否删除此Domain", "是", "否");
|
||||
if (isOk)
|
||||
{
|
||||
|
||||
@@ -14,39 +14,39 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
protected BuildAssetDataSetting dataSetting;
|
||||
|
||||
protected bool isSimulate;
|
||||
protected bool isRaw;
|
||||
// protected bool isSimulate;
|
||||
// protected bool isRaw;
|
||||
|
||||
[Title("清理构建缓存", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("BuildCache")]
|
||||
[InfoBox("当不勾选此项的时候,引擎会开启增量打包模式,会极大提高构建速度!")]
|
||||
[OnValueChanged("SetBuildCacheToggle")]
|
||||
[HideIf("isSimulate", true)]
|
||||
[HideIf("@ dataSetting.selectedBuildPipelines==EBuildPipeline.EditorSimulateBuildPipeline")]
|
||||
public bool clearBuildCacheToggle;
|
||||
|
||||
[Title("依赖数据库", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("BuildCache")]
|
||||
[InfoBox("当开启此项的时候,会极大提高构建速度!")]
|
||||
[OnValueChanged("SetUseAssetDependencyDB")]
|
||||
[HideIf("isSimulate", true)]
|
||||
[HideIf("@ dataSetting.selectedBuildPipelines==EBuildPipeline.EditorSimulateBuildPipeline")]
|
||||
public bool useAssetDependencyDBToggle;
|
||||
|
||||
[Title("资源包的压缩方式", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("FileStyle"), HideLabel]
|
||||
[OnValueChanged("SetCompression")]
|
||||
[HideIf("@isSimulate==true || isRaw==true")]
|
||||
[ShowIf("@ dataSetting.selectedBuildPipelines==EBuildPipeline.BuiltinBuildPipeline")]
|
||||
public ECompressOption compression;
|
||||
|
||||
[Title("资源包文件名称样式", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("FileStyle"), HideLabel]
|
||||
[OnValueChanged("SetFileNameStyle")]
|
||||
[HideIf("isSimulate", true)]
|
||||
[HideIf("@ dataSetting.selectedBuildPipelines==EBuildPipeline.EditorSimulateBuildPipeline")]
|
||||
public EFileNameStyle fileNameStyle;
|
||||
|
||||
[Title("首包资源文件的拷贝方式", titleAlignment: TitleAlignments.Centered)]
|
||||
[HorizontalGroup("FileStyle"), HideLabel]
|
||||
[OnValueChanged("SetCopyBuildinFileOption")]
|
||||
[HideIf("isSimulate", true)]
|
||||
[HideIf("@ dataSetting.selectedBuildPipelines==EBuildPipeline.EditorSimulateBuildPipeline")]
|
||||
public EBuildinFileCopyOption copyBuildinFileOption;
|
||||
|
||||
[Title("首包资源文件的拷贝参数", titleAlignment: TitleAlignments.Centered)]
|
||||
@@ -118,6 +118,10 @@ namespace Stary.Evo.Editor
|
||||
public virtual void ExecuteBuild()
|
||||
{
|
||||
// GetPackageVersion();
|
||||
if (dataSetting.packageName == "Main")
|
||||
{
|
||||
dataSetting.GetBuildPackageVersion(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public RawfileBuildpipelineViewer(BuildAssetDataSetting packageName) : base(packageName)
|
||||
{
|
||||
isRaw = true;
|
||||
// isSimulate = false;
|
||||
// isRaw = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +42,10 @@ namespace Stary.Evo.Editor
|
||||
RawFileBuildPipeline pipeline = new RawFileBuildPipeline();
|
||||
var buildResult = pipeline.Run(buildParameters, true);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
EditorUtility.RevealInFinder(buildResult.OutputPackageDirectory);
|
||||
base.ExecuteBuild();
|
||||
base.ExecuteBuild();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public ScriptableBuildPipelineViewer(BuildAssetDataSetting packageName) : base(packageName)
|
||||
{
|
||||
//isSimulate = false;
|
||||
}
|
||||
|
||||
public override void ExecuteBuild()
|
||||
@@ -44,8 +45,10 @@ namespace Stary.Evo.Editor
|
||||
ScriptableBuildPipeline pipeline = new ScriptableBuildPipeline();
|
||||
var buildResult = pipeline.Run(buildParameters, true);
|
||||
if (buildResult.Success)
|
||||
{
|
||||
EditorUtility.RevealInFinder(buildResult.OutputPackageDirectory);
|
||||
base.ExecuteBuild();
|
||||
base.ExecuteBuild();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Stary.Evo.Editor
|
||||
{
|
||||
public SimulateBuildPipelineViewer(BuildAssetDataSetting packageName) : base(packageName)
|
||||
{
|
||||
isSimulate = true;
|
||||
//isSimulate = true;
|
||||
}
|
||||
|
||||
public override void ExecuteBuild()
|
||||
|
||||
Reference in New Issue
Block a user