Remy
7 年前
当前提交
901f41aa
共有 3 个文件被更改,包括 70 次插入 和 56 次删除
-
77Tests/Scripts/Editor/GraphicTests/Framework/TestResultWindow.cs
-
11Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs.meta
-
38Tests/Scripts/Editor/GraphicTests/Framework/GraphicTestContext.cs
|
|||
fileFormatVersion: 2 |
|||
guid: adf58e95bb5f8eb40aca04ec74f4dae5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
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() |
|||
{ |
|||
TestResultWindow.OpenWindow((SceneAsset) Selection.activeObject); |
|||
} |
|||
|
|||
[MenuItem("Assets/Open Graphic Test Result", true)] |
|||
private static bool OpenGraphicTestResultValidation() |
|||
{ |
|||
if (((SceneAsset) Selection.activeObject) == null) return false; |
|||
|
|||
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) )); |
|||
} |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue