diff --git a/.yamato/com.unity.ml-agents-pack.yml b/.yamato/com.unity.ml-agents-pack.yml index 3926eb575b..362bea879f 100644 --- a/.yamato/com.unity.ml-agents-pack.yml +++ b/.yamato/com.unity.ml-agents-pack.yml @@ -7,7 +7,7 @@ pack: commands: - | python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u 2018.4 -c editor --wait --fast + unity-downloader-cli -u 2019.4 -c editor --wait --fast ./.Editor/Unity -projectPath Project -batchMode -executeMethod Unity.MLAgents.SampleExporter.ExportCuratedSamples -logFile - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm upm-ci project pack --project-path Project diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index 94dd374481..48d5f4bc41 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -1,13 +1,8 @@ test_editors: - - version: 2018.4 - # 2018.4 doesn't support code-coverage - enableCodeCoverage: !!bool false - # We want some scene tests to run in the DevProject, but packages there only support 2019+ - testProject: Project - enableNoDefaultPackages: !!bool false - version: 2019.4 enableCodeCoverage: !!bool true - testProject: DevProject + # We want some scene tests to run in the DevProject, but packages there only support 2019+ + testProject: Project enableNoDefaultPackages: !!bool true - version: 2020.2 enableCodeCoverage: !!bool true diff --git a/.yamato/test_versions.metafile b/.yamato/test_versions.metafile index ed61388c8d..fb205a7978 100644 --- a/.yamato/test_versions.metafile +++ b/.yamato/test_versions.metafile @@ -3,9 +3,10 @@ # For each "other" test, we only run it against a single version of the # editor to reduce the number of yamato jobs test_editors: - - version: 2018.4 - extra_test: llapi - version: 2019.4 extra_test: gym - - version: 2020.2 + - version: 2020.3 extra_test: sensor +# TODO change to 2021.1 soon + - version: 2020.2 + extra_test: llapi diff --git a/DevProject/Packages/manifest.json b/DevProject/Packages/manifest.json index 89ec0be321..d9342dff1d 100644 --- a/DevProject/Packages/manifest.json +++ b/DevProject/Packages/manifest.json @@ -3,10 +3,11 @@ "com.unity.2d.sprite": "1.0.0", "com.unity.2d.tilemap": "1.0.0", "com.unity.ads": "3.6.1", - "com.unity.analytics": "3.3.5", + "com.unity.analytics": "3.5.3", "com.unity.coding": "0.1.0-preview.13", - "com.unity.collab-proxy": "1.2.16", - "com.unity.ide.rider": "1.1.4", + "com.unity.collab-proxy": "1.3.9", + "com.unity.ide.rider": "2.0.7", + "com.unity.ide.visualstudio": "2.0.7", "com.unity.ide.vscode": "1.2.3", "com.unity.inputsystem": "1.1.0-preview.3", "com.unity.ml-agents": "file:../../com.unity.ml-agents", @@ -14,12 +15,12 @@ "com.unity.multiplayer-hlapi": "1.0.8", "com.unity.package-manager-doctools": "1.7.0-preview", "com.unity.package-validation-suite": "0.19.0-preview", - "com.unity.purchasing": "2.2.1", + "com.unity.purchasing": "2.2.2", "com.unity.test-framework": "1.1.22", "com.unity.test-framework.performance": "2.2.0-preview", "com.unity.testtools.codecoverage": "1.0.0-pre.3", - "com.unity.textmeshpro": "2.0.1", - "com.unity.timeline": "1.2.12", + "com.unity.textmeshpro": "3.0.1", + "com.unity.timeline": "1.4.6", "com.unity.ugui": "1.0.0", "com.unity.xr.legacyinputhelpers": "2.1.7", "com.unity.modules.ai": "1.0.0", diff --git a/DevProject/Packages/packages-lock.json b/DevProject/Packages/packages-lock.json index 725ea35998..f6c05bbf58 100644 --- a/DevProject/Packages/packages-lock.json +++ b/DevProject/Packages/packages-lock.json @@ -22,7 +22,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.analytics": { - "version": "3.3.5", + "version": "3.5.3", "depth": 0, "source": "registry", "dependencies": { @@ -31,7 +31,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.barracuda": { - "version": "1.3.1-preview", + "version": "1.3.2-preview", "depth": 1, "source": "registry", "dependencies": { @@ -60,7 +60,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.collab-proxy": { - "version": "1.2.16", + "version": "1.3.9", "depth": 0, "source": "registry", "dependencies": {}, @@ -74,7 +74,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.ide.rider": { - "version": "1.1.4", + "version": "2.0.7", "depth": 0, "source": "registry", "dependencies": { @@ -82,6 +82,15 @@ }, "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, + "com.unity.ide.visualstudio": { + "version": "2.0.7", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.9" + }, + "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + }, "com.unity.ide.vscode": { "version": "1.2.3", "depth": 0, @@ -108,12 +117,11 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.barracuda": "1.3.1-preview", + "com.unity.barracuda": "1.3.2-preview", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.unityanalytics": "1.0.0" + "com.unity.modules.physics2d": "1.0.0" } }, "com.unity.ml-agents.extensions": { @@ -121,7 +129,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.ml-agents": "1.8.0-preview" + "com.unity.ml-agents": "2.0.0-exp.1" } }, "com.unity.multiplayer-hlapi": { @@ -169,7 +177,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.purchasing": { - "version": "2.2.1", + "version": "2.2.2", "depth": 0, "source": "registry", "dependencies": { @@ -216,7 +224,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.textmeshpro": { - "version": "2.0.1", + "version": "3.0.1", "depth": 0, "source": "registry", "dependencies": { @@ -225,10 +233,15 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.timeline": { - "version": "1.2.12", + "version": "1.4.6", "depth": 0, "source": "registry", - "dependencies": {}, + "dependencies": { + "com.unity.modules.director": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0" + }, "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.ugui": { @@ -406,6 +419,18 @@ "depth": 0, "source": "builtin", "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.uielementsnative": "1.0.0" + } + }, + "com.unity.modules.uielementsnative": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" } diff --git a/DevProject/ProjectSettings/EditorBuildSettings.asset b/DevProject/ProjectSettings/EditorBuildSettings.asset index 8629f07f66..1823a7a08e 100644 --- a/DevProject/ProjectSettings/EditorBuildSettings.asset +++ b/DevProject/ProjectSettings/EditorBuildSettings.asset @@ -8,4 +8,6 @@ EditorBuildSettings: - enabled: 1 path: Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene.unity guid: 9bafc50b1e55b43b2b1ae9620f1f8311 - m_configObjects: {} + m_configObjects: + com.unity.ml-agents.settings: {fileID: 11400000, guid: 7017f4eb06bef4889a3608a54b1cc59e, + type: 2} diff --git a/DevProject/ProjectSettings/ProjectVersion.txt b/DevProject/ProjectSettings/ProjectVersion.txt index e8a0ab94d4..4db0bd06ea 100644 --- a/DevProject/ProjectSettings/ProjectVersion.txt +++ b/DevProject/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.4.20f1 -m_EditorVersionWithRevision: 2019.4.20f1 (6dd1c08eedfa) +m_EditorVersion: 2020.3.0f1 +m_EditorVersionWithRevision: 2020.3.0f1 (c7b5465681fb) diff --git a/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo.meta b/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo.meta index 41b52db1b7..ee6b2f3cbd 100644 --- a/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo.meta +++ b/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: bbf6756da134740eaa002a1b84f655cb ScriptedImporter: - fileIDToRecycleName: - 11400000: Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo + internalIDToNameTable: + - first: + 114: 11400000 + second: Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBall.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo.meta b/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo.meta index cbfd8d3cce..5532148f0b 100644 --- a/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo.meta +++ b/Project/Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 6942431e411b146be9a597663eca89af ScriptedImporter: - fileIDToRecycleName: - 11400000: Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo + internalIDToNameTable: + - first: + 114: 11400000 + second: Assets/ML-Agents/Examples/3DBall/Demos/Expert3DBallHard.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo.meta b/Project/Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo.meta index f2e7bf3e60..8aea82a0db 100644 --- a/Project/Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo.meta +++ b/Project/Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 414224ce8b3e247ad936b17f574b10ab ScriptedImporter: - fileIDToRecycleName: - 11400000: Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo + internalIDToNameTable: + - first: + 114: 11400000 + second: Assets/ML-Agents/Examples/Basic/Demos/ExpertBasic.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo.meta b/Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo.meta index fef3323ea0..ab7b5ba2a8 100644 --- a/Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo.meta +++ b/Project/Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 34586a8d0f1c342a49973b36a609e73b ScriptedImporter: - fileIDToRecycleName: - 11400002: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo + internalIDToNameTable: + - first: + 114: 11400002 + second: Assets/ML-Agents/Examples/Crawler/Demos/ExpertCrawler.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo.meta b/Project/Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo.meta index e02f72ef4f..2a4d92b513 100644 --- a/Project/Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo.meta +++ b/Project/Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 0092f2e4aece345aea4730a37eeebf68 ScriptedImporter: - fileIDToRecycleName: - 11400002: Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo + internalIDToNameTable: + - first: + 114: 11400002 + second: Assets/ML-Agents/Examples/GridWorld/Demos/ExpertGridWorld.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo.meta b/Project/Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo.meta index 7d899304c0..ae7115570f 100644 --- a/Project/Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo.meta +++ b/Project/Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 41c6af18564fe425fa1c047d603ee34e ScriptedImporter: - fileIDToRecycleName: - 11400000: Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo + internalIDToNameTable: + - first: + 114: 11400000 + second: Assets/ML-Agents/Examples/Hallway/Demos/ExpertHallway.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo.meta b/Project/Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo.meta index 4041ed87d2..7ca9e9a17d 100644 --- a/Project/Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo.meta +++ b/Project/Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 7f11f35191533404c9957443a681aaee ScriptedImporter: - fileIDToRecycleName: - 11400002: Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo + internalIDToNameTable: + - first: + 114: 11400002 + second: Assets/ML-Agents/Examples/PushBlock/Demos/ExpertPushBlock.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo.meta b/Project/Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo.meta index 7d7371c3d4..1bd64175ca 100644 --- a/Project/Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo.meta +++ b/Project/Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: 2f9d53c90f11846d7a6499ce0f1dfebb ScriptedImporter: - fileIDToRecycleName: - 11400000: Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo + internalIDToNameTable: + - first: + 114: 11400000 + second: Assets/ML-Agents/Examples/Pyramids/Demos/ExpertPyramid.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo.meta b/Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo.meta index 86033aefb0..93d8a636d2 100644 --- a/Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo.meta +++ b/Project/Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo.meta @@ -1,9 +1,12 @@ fileFormatVersion: 2 guid: a4b02e2c382c247919eb63ce72e90a3b ScriptedImporter: - fileIDToRecycleName: - 11400002: Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo + internalIDToNameTable: + - first: + 114: 11400002 + second: Assets/ML-Agents/Examples/Walker/Demos/ExpertWalker.demo externalObjects: {} + serializedVersion: 2 userData: ' (Unity.MLAgents.Demonstrations.DemonstrationSummary)' assetBundleName: assetBundleVariant: diff --git a/Project/Packages/manifest.json b/Project/Packages/manifest.json index 288cc289e5..12034a9414 100644 --- a/Project/Packages/manifest.json +++ b/Project/Packages/manifest.json @@ -1,12 +1,22 @@ { "dependencies": { - "com.unity.ads": "2.0.8", - "com.unity.collab-proxy": "1.2.15", + "com.unity.2d.sprite": "1.0.0", + "com.unity.2d.tilemap": "1.0.0", + "com.unity.ads": "3.6.1", + "com.unity.collab-proxy": "1.2.16", + "com.unity.ide.rider": "1.1.4", + "com.unity.ide.vscode": "1.2.3", "com.unity.ml-agents": "file:../../com.unity.ml-agents", "com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions", - "com.unity.package-manager-ui": "2.0.13", - "com.unity.textmeshpro": "1.4.1", + "com.unity.multiplayer-hlapi": "1.0.8", + "com.unity.nuget.newtonsoft-json": "2.0.0", + "com.unity.test-framework": "1.1.22", + "com.unity.textmeshpro": "2.0.1", + "com.unity.timeline": "1.2.6", + "com.unity.ugui": "1.0.0", + "com.unity.xr.legacyinputhelpers": "2.1.7", "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", "com.unity.modules.audio": "1.0.0", @@ -35,8 +45,7 @@ "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0", - "com.unity.nuget.newtonsoft-json": "2.0.0" + "com.unity.modules.xr": "1.0.0" }, "testables": [ "com.unity.ml-agents", diff --git a/Project/ProjectSettings/EditorSettings.asset b/Project/ProjectSettings/EditorSettings.asset index 88ceb8990b..2b70aa78a0 100644 --- a/Project/ProjectSettings/EditorSettings.asset +++ b/Project/ProjectSettings/EditorSettings.asset @@ -3,7 +3,7 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 + serializedVersion: 9 m_ExternalVersionControlSupport: Hidden Meta Files m_SerializationMode: 2 m_LineEndingsForNewScripts: 1 @@ -16,8 +16,20 @@ EditorSettings: m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref m_ProjectGenerationRootNamespace: m_CollabEditorSettings: inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_ShowLightmapResolutionOverlay: 1 + m_UseLegacyProbeSampleCount: 1 + m_AssetPipelineMode: 1 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 diff --git a/Project/ProjectSettings/ProjectVersion.txt b/Project/ProjectSettings/ProjectVersion.txt index 760ea9aaab..e8a0ab94d4 100644 --- a/Project/ProjectSettings/ProjectVersion.txt +++ b/Project/ProjectSettings/ProjectVersion.txt @@ -1 +1,2 @@ -m_EditorVersion: 2018.4.32f1 +m_EditorVersion: 2019.4.20f1 +m_EditorVersionWithRevision: 2019.4.20f1 (6dd1c08eedfa) diff --git a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md index 1d78abbf48..73f459fea4 100644 --- a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md +++ b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md @@ -54,13 +54,13 @@ may take several minutes to resolve the packages the first time that you add it. ## Requirements -This version of the Unity ML-Agents Extensions package is compatible with the -following versions of the Unity Editor: +This version of the Unity ML-Agents package is compatible with the following +versions of the Unity Editor: -- If using the `InputActuatorComponent` - - 2019.4 or later - - install the `com.unity.inputsystem` package version `1.1.0-preview.3` or later. -- Else 2018.4 and later +- 2019.4 and later + +If using the `InputActuatorComponent` +- install the `com.unity.inputsystem` package version `1.1.0-preview.3` or later. ## Known Limitations - For the `InputActuatorComponent` diff --git a/com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs b/com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs index c06ae75d1b..f48f6481f5 100644 --- a/com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs +++ b/com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Extensions.Input; using UnityEditor; @@ -23,4 +23,4 @@ public override void OnInspectorGUI() } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs index e2edd19d86..230bb65c57 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Actuators; using UnityEngine; using UnityEngine.InputSystem; @@ -43,4 +43,4 @@ public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs index 7fd143b570..3d42226eaa 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Actuators; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; @@ -33,4 +33,4 @@ public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs index ea77bb5413..5de783d812 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Actuators; using UnityEngine.InputSystem; using UnityEngine.InputSystem.LowLevel; @@ -32,4 +32,4 @@ public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs index bd920ab169..3bb9f98d57 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Actuators; using UnityEngine.InputSystem; using UnityEngine.InputSystem.LowLevel; @@ -33,4 +33,4 @@ public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs index 95e7ed7124..e12f15b4c0 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using System; using Unity.MLAgents.Actuators; using UnityEngine; @@ -42,4 +42,4 @@ public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs b/com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs index 0717d614b6..fd56c3503f 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using UnityEngine.InputSystem; namespace Unity.MLAgents.Extensions.Input @@ -24,4 +24,4 @@ public interface IInputActionAssetProvider (InputActionAsset, IInputActionCollection2) GetInputActionAsset(); } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs b/com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs index d61aaa8f3b..1f3a12e64a 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using System; using Unity.MLAgents.Actuators; using UnityEngine.InputSystem; @@ -38,4 +38,4 @@ public interface IRLActionInputAdaptor void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers); } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs b/com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs index 4760ea1758..cfb1012f1c 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using Unity.MLAgents.Actuators; using Unity.MLAgents.Policies; @@ -100,4 +100,4 @@ public BuiltInActuatorType GetBuiltInActuatorType() } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs index 71c5b1a6ad..334d0d8cea 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using System; using System.Collections.Generic; using Unity.Collections; @@ -374,4 +374,4 @@ public void EventProcessedInFrame() } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorEventContext.cs b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorEventContext.cs index de8463fd18..d7021ccd8f 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorEventContext.cs +++ b/com.unity.ml-agents.extensions/Runtime/Input/InputActuatorEventContext.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_SYSTEM using System; using Unity.Collections; using UnityEngine.InputSystem; @@ -78,4 +78,4 @@ public void Dispose() } } } -#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_SYSTEM diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs index 26378f170b..7187a7e331 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using NUnit.Framework; using Unity.MLAgents.Actuators; using Unity.MLAgents.Extensions.Input; @@ -77,4 +77,4 @@ public void TestWriteToHeuristic() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs index 8beeb08727..7033b383fe 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using NUnit.Framework; using Unity.MLAgents.Actuators; using Unity.MLAgents.Extensions.Input; @@ -75,4 +75,4 @@ public void TestWriteToHeuristic() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs index 7b6cb400e0..300dabec0c 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using NUnit.Framework; using Unity.MLAgents.Actuators; using Unity.MLAgents.Extensions.Input; @@ -76,4 +76,4 @@ public void TestWriteToHeuristic() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs index 905586aeb9..fe29e85d74 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using System; using NUnit.Framework; using Unity.MLAgents.Actuators; @@ -78,4 +78,4 @@ public void TestWriteToHeuristic() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs index 6002312512..70f29d9a88 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using NUnit.Framework; using Unity.MLAgents.Actuators; using Unity.MLAgents.Extensions.Input; @@ -78,4 +78,4 @@ public void TestWriteToHeuristic() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs index 514bc48df2..dc3f268359 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS using NUnit.Framework; using Unity.Barracuda; using Unity.MLAgents.Actuators; @@ -80,4 +80,4 @@ public void TestOnActionReceived() } } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs index 61ec3325da..d7dff9102d 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs @@ -1,4 +1,4 @@ -#if MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#if MLA_INPUT_TESTS //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator @@ -315,4 +315,4 @@ public interface IMovementActions void OnJump(InputAction.CallbackContext context); } } -#endif // MLA_INPUT_TESTS && UNITY_2019_4_OR_NEWER +#endif // MLA_INPUT_TESTS diff --git a/com.unity.ml-agents.extensions/package.json b/com.unity.ml-agents.extensions/package.json index 9248689f29..6684068bf8 100644 --- a/com.unity.ml-agents.extensions/package.json +++ b/com.unity.ml-agents.extensions/package.json @@ -2,7 +2,7 @@ "name": "com.unity.ml-agents.extensions", "displayName": "ML Agents Extensions", "version": "0.3.0-preview", - "unity": "2018.4", + "unity": "2019.4", "description": "A source-only package for new features based on ML-Agents", "dependencies": { "com.unity.ml-agents": "2.0.0-exp.1" diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 9274458966..b3e2ba27bc 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to ## [Unreleased] ### Major Changes #### com.unity.ml-agents (C#) +- The minimum supported Unity version was updated to 2019.4. (#5166) - Several breaking interface changes were made. See the [Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_14_docs/docs/Migrating.md) for more details. diff --git a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md index feb0421f57..d92e5e66b2 100644 --- a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md +++ b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md @@ -58,7 +58,7 @@ To install the companion Python package to enable training behaviors, follow the This version of the Unity ML-Agents package is compatible with the following versions of the Unity Editor: -- 2018.4 and later +- 2019.4 and later ## Known Limitations diff --git a/com.unity.ml-agents/Editor/MLAgentsSettingsBuildProvider.cs b/com.unity.ml-agents/Editor/MLAgentsSettingsBuildProvider.cs index 6f64c5a1a4..a91c07ecd7 100644 --- a/com.unity.ml-agents/Editor/MLAgentsSettingsBuildProvider.cs +++ b/com.unity.ml-agents/Editor/MLAgentsSettingsBuildProvider.cs @@ -53,23 +53,17 @@ public void OnPostprocessBuild(BuildReport report) private static bool IsPlayerSettingsDirty() { -#if UNITY_2019_OR_NEWER var settings = Resources.FindObjectsOfTypeAll(); if (settings != null && settings.Length > 0) return EditorUtility.IsDirty(settings[0]); return false; -#else - return false; -#endif } private static void ClearPlayerSettingsDirtyFlag() { -#if UNITY_2019_OR_NEWER var settings = Resources.FindObjectsOfTypeAll(); if (settings != null && settings.Length > 0) EditorUtility.ClearDirty(settings[0]); -#endif } } } diff --git a/com.unity.ml-agents/Editor/MLAgentsSettingsProvider.cs b/com.unity.ml-agents/Editor/MLAgentsSettingsProvider.cs index 1edc207dcf..4077927a4e 100644 --- a/com.unity.ml-agents/Editor/MLAgentsSettingsProvider.cs +++ b/com.unity.ml-agents/Editor/MLAgentsSettingsProvider.cs @@ -4,11 +4,7 @@ using System.Runtime.CompilerServices; using UnityEngine; using UnityEditor; -#if UNITY_2019_4_OR_NEWER using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif [assembly: InternalsVisibleTo("Unity.ML-Agents.DevTests.Editor")] namespace Unity.MLAgents.Editor diff --git a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs index aa27bc151f..8e28c371b5 100644 --- a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs +++ b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs @@ -1,9 +1,3 @@ -#if MLA_UNITY_ANALYTICS_MODULE || !UNITY_2019_4_OR_NEWER -#define MLA_UNITY_ANALYTICS_MODULE_ENABLED -#endif - - -using System; using System.Collections.Generic; using System.Diagnostics; using Unity.Barracuda; @@ -13,16 +7,16 @@ using Unity.MLAgents.Sensors; using UnityEngine; -#if MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if MLA_UNITY_ANALYTICS_MODULE using UnityEngine.Analytics; #endif #if UNITY_EDITOR using UnityEditor; -#if MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if MLA_UNITY_ANALYTICS_MODULE using UnityEditor.Analytics; -#endif // MLA_UNITY_ANALYTICS_MODULE_ENABLED +#endif // MLA_UNITY_ANALYTICS_MODULE #endif // UNITY_EDITOR @@ -62,13 +56,13 @@ static bool EnableAnalytics() return true; } -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE AnalyticsResult result = EditorAnalytics.RegisterEventWithLimit(k_EventName, k_MaxEventsPerHour, k_MaxNumberOfElements, k_VendorKey, k_EventVersion); if (result == AnalyticsResult.Ok) { s_EventRegistered = true; } -#elif MLA_UNITY_ANALYTICS_MODULE_ENABLED +#elif MLA_UNITY_ANALYTICS_MODULE AnalyticsResult result = AnalyticsResult.UnsupportedPlatform; if (result == AnalyticsResult.Ok) { @@ -104,7 +98,7 @@ public static bool IsAnalyticsEnabled() /// ActionSpec for the Agent. Used to generate information about the action space. /// List of IActuators for the Agent. Used to generate information about the action space. /// - [Conditional("MLA_UNITY_ANALYTICS_MODULE_ENABLED")] + [Conditional("MLA_UNITY_ANALYTICS_MODULE")] public static void InferenceModelSet( NNModel nnModel, string behaviorName, @@ -133,7 +127,7 @@ IList actuators var data = GetEventForModel(nnModel, behaviorName, inferenceDevice, sensors, actionSpec, actuators); // Note - to debug, use JsonUtility.ToJson on the event. // Debug.Log(JsonUtility.ToJson(data, true)); -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE if (AnalyticsUtils.s_SendEditorAnalytics) { EditorAnalytics.SendEventWithLimit(k_EventName, data, k_EventVersion); @@ -181,7 +175,7 @@ IList actuators inferenceEvent.BarracudaModelProducer = "tensorflow_to_barracuda.py"; } -#if UNITY_2019_3_OR_NEWER && UNITY_EDITOR +#if UNITY_EDITOR var barracudaPackageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(Tensor).Assembly); inferenceEvent.BarracudaPackageVersion = barracudaPackageInfo.version; #else diff --git a/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs b/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs index faa26cfca5..e4b5c38b9e 100644 --- a/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs +++ b/com.unity.ml-agents/Runtime/Analytics/TrainingAnalytics.cs @@ -1,14 +1,10 @@ -#if MLA_UNITY_ANALYTICS_MODULE || !UNITY_2019_4_OR_NEWER -#define MLA_UNITY_ANALYTICS_MODULE_ENABLED -#endif - using System; using System.Collections.Generic; using System.Diagnostics; using Unity.MLAgents.Actuators; using Unity.MLAgents.Sensors; using UnityEngine; -#if MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if MLA_UNITY_ANALYTICS_MODULE using UnityEngine.Analytics; #if UNITY_EDITOR using UnityEditor.Analytics; @@ -65,7 +61,7 @@ internal class TrainingAnalytics static bool EnableAnalytics() { -#if MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if MLA_UNITY_ANALYTICS_MODULE if (s_EventsRegistered) { return true; @@ -94,7 +90,7 @@ static bool EnableAnalytics() return s_EventsRegistered; #else return false; -#endif // MLA_UNITY_ANALYTICS_MODULE_ENABLED +#endif // MLA_UNITY_ANALYTICS_MODULE } /// @@ -102,7 +98,7 @@ static bool EnableAnalytics() /// /// /// - [Conditional("MLA_UNITY_ANALYTICS_MODULE_ENABLED")] + [Conditional("MLA_UNITY_ANALYTICS_MODULE")] public static void SetTrainerInformation(string packageVersion, string communicationVersion) { s_TrainerPackageVersion = packageVersion; @@ -111,14 +107,14 @@ public static void SetTrainerInformation(string packageVersion, string communica public static bool IsAnalyticsEnabled() { -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE return EditorAnalytics.enabled; #else return false; #endif } - [Conditional("MLA_UNITY_ANALYTICS_MODULE_ENABLED")] + [Conditional("MLA_UNITY_ANALYTICS_MODULE")] public static void TrainingEnvironmentInitialized(TrainingEnvironmentInitializedEvent tbiEvent) { if (!IsAnalyticsEnabled()) @@ -140,7 +136,7 @@ public static void TrainingEnvironmentInitialized(TrainingEnvironmentInitialized // Debug.Log( // $"Would send event {k_TrainingEnvironmentInitializedEventName} with body {JsonUtility.ToJson(tbiEvent, true)}" // ); -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE if (AnalyticsUtils.s_SendEditorAnalytics) { EditorAnalytics.SendEventWithLimit(k_TrainingEnvironmentInitializedEventName, tbiEvent); @@ -148,7 +144,7 @@ public static void TrainingEnvironmentInitialized(TrainingEnvironmentInitialized #endif } - [Conditional("MLA_UNITY_ANALYTICS_MODULE_ENABLED")] + [Conditional("MLA_UNITY_ANALYTICS_MODULE")] public static void RemotePolicyInitialized( string fullyQualifiedBehaviorName, IList sensors, @@ -177,7 +173,7 @@ IList actuators // Debug.Log( // $"Would send event {k_RemotePolicyInitializedEventName} with body {JsonUtility.ToJson(data, true)}" // ); -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE if (AnalyticsUtils.s_SendEditorAnalytics) { EditorAnalytics.SendEventWithLimit(k_RemotePolicyInitializedEventName, data); @@ -197,7 +193,7 @@ internal static string ParseBehaviorName(string fullyQualifiedBehaviorName) return fullyQualifiedBehaviorName.Substring(0, lastQuestionIndex); } - [Conditional("MLA_UNITY_ANALYTICS_MODULE_ENABLED")] + [Conditional("MLA_UNITY_ANALYTICS_MODULE")] public static void TrainingBehaviorInitialized(TrainingBehaviorInitializedEvent tbiEvent) { if (!IsAnalyticsEnabled()) @@ -223,7 +219,7 @@ public static void TrainingBehaviorInitialized(TrainingBehaviorInitializedEvent // Debug.Log( // $"Would send event {k_TrainingBehaviorInitializedEventName} with body {JsonUtility.ToJson(tbiEvent, true)}" // ); -#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE_ENABLED +#if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE if (AnalyticsUtils.s_SendEditorAnalytics) { EditorAnalytics.SendEventWithLimit(k_TrainingBehaviorInitializedEventName, tbiEvent); diff --git a/com.unity.ml-agents/Tests/Editor/AcademyTests.cs b/com.unity.ml-agents/Tests/Editor/AcademyTests.cs index a41d9f2cfb..593197295d 100644 --- a/com.unity.ml-agents/Tests/Editor/AcademyTests.cs +++ b/com.unity.ml-agents/Tests/Editor/AcademyTests.cs @@ -1,10 +1,8 @@ using NUnit.Framework; using Unity.MLAgents.Sensors; using UnityEngine; -#if UNITY_2019_3_OR_NEWER using System.Reflection; using Unity.MLAgents; -#endif namespace Unity.MLAgents.Tests { @@ -14,13 +12,9 @@ public class AcademyTests [Test] public void TestPackageVersion() { - // Make sure that the version strings in the package and Academy don't get out of sync. - // Unfortunately, the PackageInfo methods don't exist in earlier versions of the editor. -#if UNITY_2019_3_OR_NEWER var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(Agent).Assembly); Assert.AreEqual("com.unity.ml-agents", packageInfo.name); Assert.AreEqual(Academy.k_PackageVersion, packageInfo.version); -#endif } class RecursiveAgent : Agent diff --git a/com.unity.ml-agents/package.json b/com.unity.ml-agents/package.json index 7fd2ddefc7..89a7fa8959 100755 --- a/com.unity.ml-agents/package.json +++ b/com.unity.ml-agents/package.json @@ -2,7 +2,7 @@ "name": "com.unity.ml-agents", "displayName": "ML Agents", "version": "2.0.0-exp.1", - "unity": "2018.4", + "unity": "2019.4", "description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).", "dependencies": { "com.unity.barracuda": "1.3.2-preview", diff --git a/docs/Installation.md b/docs/Installation.md index 3b2ce4449c..673b4cd7d1 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -26,7 +26,7 @@ The ML-Agents Toolkit contains several components: Consequently, to install and use the ML-Agents Toolkit you will need to: -- Install Unity (2018.4 or later) +- Install Unity (2019.4 or later) - Install Python (3.6.1 or higher) - Clone this repository (Optional) - __Note:__ If you do not clone the repository, then you will not be @@ -38,7 +38,7 @@ Consequently, to install and use the ML-Agents Toolkit you will need to: - Install the `com.unity.ml-agents.extensions` Unity package (Optional) - Install the `mlagents` Python package -### Install **Unity 2018.4** or Later +### Install **Unity 2019.4** or Later [Download](https://unity3d.com/get-unity/download) and install Unity. We strongly recommend that you install Unity through the Unity Hub as it will @@ -97,14 +97,11 @@ You can [add the local](https://docs.unity3d.com/Manual/upm-ui-local.html) project by: 1. navigating to the menu `Window` -> `Package Manager`. -1. In the package manager window click on the `+` button. +1. In the package manager window click on the `+` button on the top left of the packages list). 1. Select `Add package from disk...` 1. Navigate into the `com.unity.ml-agents` folder. 1. Select the `package.json` file. -**NOTE:** In Unity 2018.4 the `+` button is on the bottom right of the packages -list, and in Unity 2019.3 it's on the top left of the packages list. -