chore: attempted to change build path to see if CI fails

This commit is contained in:
Paolo Abela 2024-06-03 09:24:43 +01:00
Родитель 43437554ff
Коммит 72f91399c8
2 изменённых файлов: 43 добавлений и 44 удалений

Просмотреть файл

@ -129,7 +129,7 @@ namespace Unity.DedicatedGameServerSample.Editor
bool buildWindows = Menu.GetChecked(k_ServerWindowsToggleName);
bool buildLinux = Menu.GetChecked(k_ServerLinuxToggleName);
var buildPathRoot = Path.Combine("Builds", "Server");
var buildPathRoot = Path.Combine(Application.dataPath, "..", "Builds", "Server");
DeleteOutputFolder("Server/");
@ -164,7 +164,7 @@ namespace Unity.DedicatedGameServerSample.Editor
bool buildWindows = Menu.GetChecked(k_ClientWindowsToggleName);
bool buildLinux = Menu.GetChecked(k_ClientLinuxToggleName);
var buildPathRoot = Path.Combine("Builds", "Client");
var buildPathRoot = Path.Combine(Application.dataPath, "..", "Builds", "Client");
DeleteOutputFolder("Client/");

Просмотреть файл

@ -130,37 +130,36 @@ namespace Unity.DedicatedGameServerSample.Editor
internal static void BuildServer(BuildTarget target, string locationPathName, bool exitApplicationOnFailure = false)
{
Debug.Log($"Building {target} server");
Debug.Log($"Building {target} server in: {locationPathName}");
EditorUserBuildSettings.SwitchActiveBuildTarget(NamedBuildTarget.Server, BuildTarget.StandaloneLinux64);
//var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions
//{
// scenes = GetScenePaths(),
// locationPathName = locationPathName,
// target = target,
// subtarget = (int) StandaloneBuildSubtarget.Server,
//});
//if (exitApplicationOnFailure && report.summary.result != BuildResult.Succeeded)
//{
// EditorApplication.Exit(1);
//}
var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions
{
scenes = GetScenePaths(),
locationPathName = locationPathName,
target = target,
subtarget = (int)StandaloneBuildSubtarget.Server,
});
if (exitApplicationOnFailure && report.summary.result != BuildResult.Succeeded)
{
EditorApplication.Exit(1);
}
}
internal static void BuildClient(BuildTarget target, string locationPathName, bool exitApplicationOnFailure = false)
{
Debug.Log($"Building {target} client");
Debug.Log($"Building {target} client in: {locationPathName}");
EditorUserBuildSettings.SwitchActiveBuildTarget(NamedBuildTarget.Standalone, target);
//var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions
//{
// scenes = GetScenePaths(),
// locationPathName = locationPathName,
// target = target,
// subtarget = (int) StandaloneBuildSubtarget.Player,
//});
//if (exitApplicationOnFailure && report.summary.result != BuildResult.Succeeded)
//{
// EditorApplication.Exit(1);
//}
var report = BuildPipeline.BuildPlayer(new BuildPlayerOptions
{
scenes = GetScenePaths(),
locationPathName = locationPathName,
target = target,
subtarget = (int)StandaloneBuildSubtarget.Player,
});
if (exitApplicationOnFailure && report.summary.result != BuildResult.Succeeded)
{
EditorApplication.Exit(1);
}
}
static string[] GetScenePaths()