浏览代码

Add context menu item to allow to show test results more quickly... Hope so.

/main
Remy 7 年前
当前提交
56120f1c
共有 2 个文件被更改,包括 47 次插入0 次删除
  1. 36
      Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs
  2. 11
      Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs.meta

36
Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs


using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
namespace UnityEngine.Experimental.Rendering
{
public class GraphicTestContext
{
[MenuItem("Assets/Open Graphic Test Result")]
private static void OpenGraphicTestResult()
{
}
[MenuItem("Assets/Open Graphic Test Result", true)]
private static bool OpenGraphicTestResultValidation()
{
List<string> scenes = new List<string>();
foreach (TestFrameworkTools.TestInfo testInfo in TestFrameworkTools.CollectScenes.HDRP)
{
scenes.Add(testInfo.name);
}
foreach (TestFrameworkTools.TestInfo testInfo in TestFrameworkTools.CollectScenes.LWRP)
{
scenes.Add(testInfo.name);
}
return scenes.Contains(Path.GetFileName( AssetDatabase.GetAssetPath(Selection.activeObject) ));
}
}
}

11
Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs.meta


fileFormatVersion: 2
guid: adf58e95bb5f8eb40aca04ec74f4dae5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存