浏览代码

Add settings for building playmode graphic tests

/main
Remy 7 年前
当前提交
82ffcc9f
共有 2 个文件被更改,包括 26 次插入2 次删除
  1. 26
      Tests/GraphicsTests/Framework/Editor/PlayModeTestFramework.cs
  2. 2
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/PlayModeTest/PlayModeTestsUI.cs

26
Tests/GraphicsTests/Framework/Editor/PlayModeTestFramework.cs


{
static string scenesRootPath = "/Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes";
enum Platforms { PC, PS4};
Platforms platform = Platforms.PC;
bool developmentBuild = false;
bool buildAndRun = true;
[MenuItem("Internal/GraphicTest Tools/PlayMode Test Window")]
public static void OpenPlayModeTestWindow()
{

GUILayout.Label(allPaths[i]);
}
platform = (Platforms)EditorGUILayout.EnumPopup("Target Platform ", platform);
developmentBuild = EditorGUILayout.Toggle("Development Build", developmentBuild);
buildAndRun = EditorGUILayout.Toggle("Build and Run", buildAndRun);
if (GUILayout.Button("Build Player"))
{
EditorBuildSettingsScene[] prevScenes = EditorBuildSettings.scenes;

//System.IO.Directory.Move(Application.dataPath + "/ImageTemplates/HDRenderPipeline", Application.dataPath + "/ImageTemplates/Resources/HDRenderPipeline");
BuildPipeline.BuildPlayer(testScenes, Application.dataPath + "/../Builds/GraphicTests/GraphicTestBuildPC.exe", BuildTarget.StandaloneWindows64, BuildOptions.None);
BuildOptions options = BuildOptions.None;
if (developmentBuild) options |= BuildOptions.Development;
if (buildAndRun) options |= BuildOptions.AutoRunPlayer;
switch (platform)
{
case Platforms.PC:
BuildPipeline.BuildPlayer(testScenes, Application.dataPath + "/../Builds/GraphicTests/PC/GraphicTestBuildPC.exe", BuildTarget.StandaloneWindows64, options);
break;
case Platforms.PS4:
BuildPipeline.BuildPlayer(testScenes, Application.dataPath + "/../Builds/GraphicTests/PS4/GraphicTestBuildPS4.self", BuildTarget.PS4, options);
break;
}
// Move back Templates to their folder
for (int i = 0; i < templates.Length; ++i)

2
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/PlayModeTest/PlayModeTestsUI.cs


resultsMaxValue[i] = singleTestResult.Find("Max_Value/Text").GetComponent<Text>();
resultsMaxFill[i] = singleTestResult.Find("Max_Value/Fill").GetComponent<RectTransform>();
singleTestResult.parent = scrollView.content;
singleTestResult.SetParent(scrollView.content);
singleTestResult.anchorMin = new Vector2(0, 0);
singleTestResult.anchorMax = new Vector2(1, 0);
singleTestResult.offsetMin = new Vector2(0, scrollView.content.rect.height - (i + 1) * 200f);

正在加载...
取消
保存