您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

32 行
901 B

using System.Linq;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Graphing;
using UnityEngine.MaterialGraph;
namespace UnityEditor.MaterialGraph.UnitTests
{
[TestFixture]
public class MaterialGraphTests
{
[TestFixtureSetUp]
public void RunBeforeAnyTests()
{
Debug.logger.logHandler = new ConsoleLogHandler();
}
[Test]
public void TestCreateMaterialGraph()
{
var graph = new UnityEngine.MaterialGraph.MaterialGraph();
Assert.IsNotNull(graph.currentGraph);
Assert.IsNotNull(graph.materialOptions);
graph.PostCreate();
Assert.AreEqual(1, graph.currentGraph.GetNodes<AbstractMaterialNode>().Count());
Assert.IsInstanceOf(typeof(PixelShaderNode), graph.currentGraph.GetNodes<AbstractMaterialNode>().FirstOrDefault());
}
}
}