[Test]
[UnityPlatform (RuntimePlatform.WindowsPlayer)]//单个
public void TestMethod1()
{
Assert.AreEqual(Application.platform, RuntimePlatform.WindowsPlayer);
}
[Test]
[UnityPlatform(exclude = new[] { RuntimePlatform.WindowsEditor })]//多个
public void TestMethod2() {
Assert.AreEqual(Application.platform, RuntimePlatform.WindowsEditor);
}UnityPlatform指定在哪些平台才会运行这些测试代码。