浏览代码

Add Load Scene button in the test result window

/main
Remy 7 年前
当前提交
e305488e
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13
      Tests/Scripts/Editor/GraphicTests/Framework/TestResultWindow.cs

13
Tests/Scripts/Editor/GraphicTests/Framework/TestResultWindow.cs


using UnityEditor;
using UnityEngine.Experimental.Rendering;
using UnityEditor.IMGUI.Controls;
using UnityEditor.SceneManagement;
using UnityEngine.Events;
namespace UnityEngine.Experimental.Rendering

GUILayout.FlexibleSpace();
bool b = GUI.enabled;
GUI.enabled = true;
if (GUILayout.Button("Open Scene"))
{
EditorSceneManager.OpenScene(AssetDatabase.GetAssetPath(sceneAsset), OpenSceneMode.Single);
}
GUI.enabled = b;
GUILayout.FlexibleSpace();
GUILayout.Label("Diff. type: ");
diffStyle = EditorGUILayout.IntPopup(diffStyle, diffStylesList, diffStylesValues,
GUILayout.Width(200f));

Rect textureRect = new Rect(leftBarWidth, topBarHeight * 3, position.width - leftBarWidth,
position.height - topBarHeight * 3);
GUI.enabled = true;
EditorGUI.DrawPreviewTexture(textureRect, templateImage, diffMaterial, ScaleMode.ScaleToFit, 0, 0);
}
}

正在加载...
取消
保存