浏览代码

Changed the popup dialog : called once fort the first test run in a session, and can be changed from the menu "Internal/GraphicTest Tools/Set Tests Pipelines"

/main
Remy 6 年前
当前提交
b2bd555b
共有 1 个文件被更改,包括 19 次插入7 次删除
  1. 26
      Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs

26
Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs


// Change the SRP before a full batch of tests
public virtual string _SRP_ID { get { return "NONE"; } }
private static bool doOnlyFirstRenderPipelineAsset = true;
[MenuItem("Internal/GraphicTest Tools/Set Tests Pipelines",false, 0)]
public static void SetTestsPipelines()
{
_doOnlyFirstRenderPipelineAsset = !EditorUtility.DisplayDialog(
"Graphic Tests",
"Do you want to run the test(s) on all available Render Pipeline assets or only the first (main) one ?",
"Hell YEAH, go for it !",
"No thanks, just one please.");
}
private static bool? _doOnlyFirstRenderPipelineAsset;
private static bool doOnlyFirstRenderPipelineAsset
{
get
{
if (!_doOnlyFirstRenderPipelineAsset.HasValue) SetTestsPipelines();
return _doOnlyFirstRenderPipelineAsset.Value;
}
}
[OneTimeSetUp]
public void OneTimeSetUp()

doOnlyFirstRenderPipelineAsset = !EditorUtility.DisplayDialog(
"Graphic Tests",
"Do you want to run the test(s) on all available Render Pipeline assets or only the first (main) one ?",
"Hell YEAH, go for it !",
"No thanks, just one please.");
}
[OneTimeTearDown]

正在加载...
取消
保存