浏览代码

Remove test scene from build settings and codebase. (#3524)

/asymm-envs
GitHub 5 年前
当前提交
d9898be5
共有 7 个文件被更改,包括 1 次插入112 次删除
  1. 5
      Project/ProjectSettings/EditorBuildSettings.asset
  2. 11
      com.unity.ml-agents/Tests/Runtime/SerializationTest.cs.meta
  3. 11
      com.unity.ml-agents/Tests/Runtime/SerializeAgent.cs.meta
  4. 16
      com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef
  5. 7
      com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef.meta
  6. 51
      com.unity.ml-agents/Tests/Runtime/SerializationTest.cs
  7. 12
      com.unity.ml-agents/Tests/Runtime/SerializeAgent.cs

5
Project/ProjectSettings/EditorBuildSettings.asset


EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Packages/com.unity.ml-agents/Tests/Runtime/SerializeTestScene.unity
guid: 60783bd849bd242eeb66243542762b23
m_Scenes: []
m_configObjects: {}

11
com.unity.ml-agents/Tests/Runtime/SerializationTest.cs.meta


fileFormatVersion: 2
guid: b5fdc828cbbf94a4d9422065d6743d81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
com.unity.ml-agents/Tests/Runtime/SerializeAgent.cs.meta


fileFormatVersion: 2
guid: c3d607733e457478885f15ee89725709
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

16
com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef


{
"name": "Unity.ML-Agents.Runtime.Tests",
"references": [
"Unity.ML-Agents"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

7
com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef.meta


fileFormatVersion: 2
guid: 721e0c090039045bb963f33c81d699a7
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

51
com.unity.ml-agents/Tests/Runtime/SerializationTest.cs


// using System.Collections;
// using NUnit.Framework;
// #if UNITY_EDITOR
// using UnityEditor.SceneManagement;
// using UnityEngine.TestTools;
// #endif
// using UnityEngine;
// using UnityEngine.SceneManagement;
//
// namespace Tests
// {
// [TestFixture]
// public class SerializationTest
// {
//
// [SetUp]
// public void Setup()
// {
// SceneManager.LoadScene("Packages/com.unity.ml-agents/Tests/Runtime/SerializeTestScene");
// }
//
// /// <summary>
// /// Test that the serialized agent in the scene, which has its agent parameter value serialized,
// /// properly deserializes it to Agent.maxStep.
// /// </summary>
// [UnityTest]
// public IEnumerator SerializationTestSimplePasses()
// {
// // Use the Assert class to test conditions
// var gameObjects = SceneManager.GetActiveScene().GetRootGameObjects();
// if (SceneManager.GetActiveScene().name != "SerializeTestScene")
// {
// yield return null;
// }
//
// GameObject agent = null;
// foreach (var go in gameObjects)
// {
// if (go.name == "Agent")
// {
// agent = go;
// break;
// }
// }
// Assert.NotNull(agent);
// var agentComponent = agent.GetComponent<SerializeAgent>();
// Assert.True(agentComponent.maxStep == 5000);
//
// }
// }
// }

12
com.unity.ml-agents/Tests/Runtime/SerializeAgent.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MLAgents;
public class SerializeAgent : Agent
{
public override float[] Heuristic()
{
return new[] {0f};
}
}
正在加载...
取消
保存