浏览代码
InputActuatorComponent to allow the generation of an action space from an InputActionAsset (#4881) (#4974)
/release_13_branch
InputActuatorComponent to allow the generation of an action space from an InputActionAsset (#4881) (#4974)
/release_13_branch
GitHub
4 年前
当前提交
7f70330b
共有 76 个文件被更改,包括 2586 次插入 和 43 次删除
-
2.yamato/com.unity.ml-agents-test.yml
-
16DevProject/Packages/manifest.json
-
42DevProject/ProjectSettings/ProjectSettings.asset
-
4DevProject/ProjectSettings/ProjectVersion.txt
-
10com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
-
3com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef
-
4com.unity.ml-agents/CHANGELOG.md
-
45com.unity.ml-agents/Runtime/Actuators/ActionSpec.cs
-
12com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
-
10com.unity.ml-agents/Runtime/Actuators/VectorActuator.cs
-
8com.unity.ml-agents/Runtime/Agent.deprecated.cs
-
1com.unity.ml-agents/Runtime/AssemblyInfo.cs
-
28com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
-
46com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs
-
2DevProject/DevProject.sln.DotSettings
-
519DevProject/Packages/packages-lock.json
-
57com.unity.ml-agents.extensions/Documentation~/InputActuatorComponent.md
-
3com.unity.ml-agents.extensions/Editor/Input.meta
-
3com.unity.ml-agents.extensions/Runtime/Input.meta
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input.meta
-
40com.unity.ml-agents/Tests/Editor/Actuators/ActionSpecTests.cs
-
3com.unity.ml-agents/Tests/Editor/Actuators/ActionSpecTests.cs.meta
-
7DevProject/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json
-
26com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs
-
3com.unity.ml-agents.extensions/Editor/Input/InputActuatorComponentEditor.cs.meta
-
26com.unity.ml-agents.extensions/Editor/Input/Unity.ML-Agents.Extensions.Editor.Input.asmdef
-
7com.unity.ml-agents.extensions/Editor/Input/Unity.ML-Agents.Extensions.Editor.Input.asmdef.meta
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors.meta
-
45com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors/ButtonInputActionAdaptor.cs.meta
-
35com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors/DoubleInputActionAdaptor.cs.meta
-
35com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors/FloatInputActionAdaptor.cs.meta
-
36com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors/IntegerInputActionAdaptor.cs.meta
-
44com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/Adaptors/Vector2InputActionAdaptor.cs.meta
-
3com.unity.ml-agents.extensions/Runtime/Input/AssemblyInfo.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/AssemblyInfo.cs.meta
-
27com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs
-
11com.unity.ml-agents.extensions/Runtime/Input/IInputActionAssetProvider.cs.meta
-
39com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/IRLActionInputAdaptor.cs.meta
-
89com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs
-
3com.unity.ml-agents.extensions/Runtime/Input/InputActionActuator.cs.meta
-
331com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs
-
11com.unity.ml-agents.extensions/Runtime/Input/InputActuatorComponent.cs.meta
-
23com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef
-
7com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef.meta
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors.meta
-
72com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/ButtonInputActionAdaptorTests.cs.meta
-
70com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/DoubleInputActionAdaptorTests.cs.meta
-
71com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/FloatInputActionAdapatorTests.cs.meta
-
73com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/IntegerInputActionAdaptorTests.cs.meta
-
73com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/Adaptors/Vector2InputActionAdaptorTests.cs.meta
-
82com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs.meta
-
112com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActuatorComponentTests.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActuatorComponentTests.cs.meta
-
318com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs
-
3com.unity.ml-agents.extensions/Tests/Runtime/Input/TestPushBlockActions.cs.meta
-
31com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef
-
7com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef.meta
|
|||
m_EditorVersion: 2019.4.7f1 |
|||
m_EditorVersionWithRevision: 2019.4.7f1 (e992b1a16e65) |
|||
m_EditorVersion: 2019.4.19f1 |
|||
m_EditorVersionWithRevision: 2019.4.19f1 (ca5b14067cec) |
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RL/@EntryIndexedValue">RL</s:String></wpf:ResourceDictionary> |
|
|||
{ |
|||
"dependencies": { |
|||
"com.unity.2d.sprite": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.2d.tilemap": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.ads": { |
|||
"version": "3.6.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.analytics": { |
|||
"version": "3.3.5", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.barracuda": { |
|||
"version": "1.3.0-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.burst": "1.3.4", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.burst": { |
|||
"version": "1.3.4", |
|||
"depth": 2, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.mathematics": "1.2.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.coding": { |
|||
"version": "0.1.0-preview.13", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.moq": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.collab-proxy": { |
|||
"version": "1.2.16", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ext.nunit": { |
|||
"version": "1.0.6", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ide.rider": { |
|||
"version": "1.1.4", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.1.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ide.vscode": { |
|||
"version": "1.2.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.inputsystem": { |
|||
"version": "1.1.0-preview.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.mathematics": { |
|||
"version": "1.2.1", |
|||
"depth": 3, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ml-agents": { |
|||
"version": "file:../../com.unity.ml-agents", |
|||
"depth": 0, |
|||
"source": "local", |
|||
"dependencies": { |
|||
"com.unity.barracuda": "1.3.0-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.ml-agents.extensions": { |
|||
"version": "file:../../com.unity.ml-agents.extensions", |
|||
"depth": 0, |
|||
"source": "local", |
|||
"dependencies": { |
|||
"com.unity.ml-agents": "1.7.2-preview" |
|||
} |
|||
}, |
|||
"com.unity.multiplayer-hlapi": { |
|||
"version": "1.0.8", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.mono-cecil": "0.1.6-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.nuget.mono-cecil": { |
|||
"version": "0.1.6-preview.2", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.mono-cecil": "0.1.6-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.nuget.newtonsoft-json": { |
|||
"version": "2.0.0-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.package-manager-doctools": { |
|||
"version": "1.7.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.package-validation-suite": "0.10.0-preview", |
|||
"com.unity.nuget.newtonsoft-json": "2.0.0-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.package-validation-suite": { |
|||
"version": "0.19.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.nuget.mono-cecil": "0.1.6-preview.2" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.purchasing": { |
|||
"version": "2.2.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.settings-manager": { |
|||
"version": "1.0.1", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.test-framework": { |
|||
"version": "1.1.20", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ext.nunit": "1.0.6", |
|||
"com.unity.modules.imgui": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.test-framework.performance": { |
|||
"version": "2.2.0-preview", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.1.0", |
|||
"com.unity.nuget.newtonsoft-json": "2.0.0-preview" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.testtools.codecoverage": { |
|||
"version": "1.0.0-pre.3", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.test-framework": "1.0.16", |
|||
"com.unity.settings-manager": "1.0.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.textmeshpro": { |
|||
"version": "2.0.1", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.ugui": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.timeline": { |
|||
"version": "1.2.12", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.ugui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.ui": "1.0.0", |
|||
"com.unity.modules.imgui": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.xr.legacyinputhelpers": { |
|||
"version": "2.1.7", |
|||
"depth": 0, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"com.unity.modules.vr": "1.0.0", |
|||
"com.unity.modules.xr": "1.0.0" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.castle-core": { |
|||
"version": "1.0.1", |
|||
"depth": 2, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.mono-cecil": { |
|||
"version": "0.1.6-preview", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": {}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"nuget.moq": { |
|||
"version": "1.0.0", |
|||
"depth": 1, |
|||
"source": "registry", |
|||
"dependencies": { |
|||
"nuget.castle-core": "1.0.1" |
|||
}, |
|||
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" |
|||
}, |
|||
"com.unity.modules.ai": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.androidjni": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.animation": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.assetbundle": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.audio": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.cloth": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.director": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.animation": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.imageconversion": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.imgui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.jsonserialize": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.particlesystem": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.physics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.physics2d": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.screencapture": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.subsystems": { |
|||
"version": "1.0.0", |
|||
"depth": 1, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.terrain": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.terrainphysics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.terrain": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.tilemap": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics2d": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.ui": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.uielements": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.imgui": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.umbra": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.unityanalytics": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequest": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.unitywebrequestassetbundle": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.assetbundle": "1.0.0", |
|||
"com.unity.modules.unitywebrequest": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequestaudio": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.audio": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequesttexture": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.unitywebrequestwww": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", |
|||
"com.unity.modules.unitywebrequestaudio": "1.0.0", |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.assetbundle": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.vehicles": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.video": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.audio": "1.0.0", |
|||
"com.unity.modules.ui": "1.0.0", |
|||
"com.unity.modules.unitywebrequest": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.vr": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.xr": "1.0.0" |
|||
} |
|||
}, |
|||
"com.unity.modules.wind": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": {} |
|||
}, |
|||
"com.unity.modules.xr": { |
|||
"version": "1.0.0", |
|||
"depth": 0, |
|||
"source": "builtin", |
|||
"dependencies": { |
|||
"com.unity.modules.physics": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.subsystems": "1.0.0" |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
# Integration of the Input System Package with ML-Agents |
|||
|
|||
## Overview |
|||
One area we are always trying to improve is getting developers up and running with ML-Agents. With this in mind, |
|||
we have implemented an `InputActuatorComponent`. This component integrates with the |
|||
[Input System Package](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.1/manual/QuickStartGuide.html) |
|||
to set up an action space for your `Agent` based on an `InputActionAsset` that is referenced by the |
|||
`IInputActionAssetProvider` interface, or the `PlayerInput` component that may be living on your player controlled |
|||
`Agent`. This means that if you have code outside of your agent that handles input, you will not need to implement |
|||
the Heuristic function in agent as well. The `InputActuatorComponent` will handle this for you. You can now train and |
|||
run inference on `Agents` with an action space defined by an `InputActionAsset`. |
|||
|
|||
This implementation includes: |
|||
|
|||
* C# `InputActuatorComponent` you can attach to your Agent. |
|||
* Implement the `IInputActionAssetProvider` in the `Componenet` where you handle player input. |
|||
* An example environment where the input handling code is not in the Heuristic function of the Agent subclass. |
|||
|
|||
### Feedback |
|||
We have only implemented a small subset of `InputControl` types that we thought would cover a large portion of what |
|||
most developers would use. Please let us know if you want more control types implemented by posting in the [ML-Agents |
|||
forum.](https://forum.unity.com/forums/ml-agents.453/) |
|||
|
|||
We would also like your feedback on the workflow of integrating this into your games. If you run |
|||
into workflow issues please let us know in the ML-Agents forums, or if you've discovered a bug, |
|||
please file a bug on our GitHub page. |
|||
|
|||
## Getting started |
|||
The C# code for the `InputActuatorComponent` exists inside of the extensions package (com.unity.ml-agents.extensions). A good first step would be to familiarize with the extensions package by reading the document [here](com.unity.ml-agents.extensions.md). The second step would be to take a look at how we have implemented the C# code in the example Input Integration scene (located under ML-Agents-Input-Example/Assets/ML-Agents/Examples/PushBlock/). Once you have some familiarity, then the next step would be to add the InputActuatorComponent to your player Agent. The example we have implemented uses C# Events to send information from the Input System. |
|||
|
|||
Additionally, see below for additional technical specifications on the C# code for the InputActuatorComponent. |
|||
|
|||
## Technical specifications for the InputActuatorComponent |
|||
|
|||
### `IInputActionsAssetProvider` Interface |
|||
The `InputActuatorComponent` searches for a `Component` that implements |
|||
`IInputActionAssetProvider` on the `GameObject` they both are attached to. It is important to note |
|||
that if multiple `Components` on your `GameObject` need to access an `InputActionAsset` to handle events, |
|||
they will need to share the same instance of the `InputActionAsset` that is returned from the |
|||
`IInputActionAssetProvider`. |
|||
|
|||
### `InputActuatorComponent` class |
|||
The `InputActuatorComponent` is the bridge between ML-Agents and the Input System.. It allows ML-Agents to |
|||
* create an `ActionSpec` for your Agent based on an `InputActionAsset` that comes from an |
|||
`IInputActionAssetProvider`. |
|||
* send simulated input from a training process or a neural network |
|||
* let developers keep their input handling code in one place |
|||
|
|||
This is accomplished by adding the `InputActuatorComponenet` to an Agent which already has the PlayerInput component attached. |
|||
|
|||
### Setting up a scene using the `InputActuatorComponent` |
|||
1. Add the `com.unity.inputsystem` version 1.1.0-preview.3 or later to your project via the Package Manager window. |
|||
2. If you have already setup an InputActionAsset skip to Step 3, otherwise follow these sub steps: |
|||
1. Create an InputActionAsset to allow your Agent to be controlled by the Input System. |
|||
2. Handle the events from the Input System where you normally would (i.e. a script external to your Agent class). |
|||
3. Add the InputSystemActuatorComponent to the GameObject that has the `PlayerInput` and `Agent` components attached. |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 1f773a20e85042999e87f5d3c7b55281 |
|||
timeCreated: 1613637190 |
|
|||
fileFormatVersion: 2 |
|||
guid: 1694e881b9ec420ba1c201f0612392d6 |
|||
timeCreated: 1610754907 |
|
|||
fileFormatVersion: 2 |
|||
guid: 27f8e1ce37d7485f814ce50a37101203 |
|||
timeCreated: 1612908869 |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using NUnit.Framework; |
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine.TestTools.Constraints; |
|||
using Is = UnityEngine.TestTools.Constraints.Is; |
|||
|
|||
namespace Unity.MLAgents.Tests.Actuators |
|||
{ |
|||
[TestFixture] |
|||
public class ActionSpecTests |
|||
{ |
|||
[Test] |
|||
public void ActionSpecCombineTest() |
|||
{ |
|||
var as0 = new ActionSpec(3, new[] { 3, 2, 1 }); |
|||
var as1 = new ActionSpec(1, new[] { 35, 122, 1, 3, 8, 3 }); |
|||
|
|||
var as0NumCon = 3; |
|||
var as0NumDis = as0.NumDiscreteActions; |
|||
var as1NumCon = 1; |
|||
var as1NumDis = as1.NumDiscreteActions; |
|||
var branchSizes = new List<int>(); |
|||
branchSizes.AddRange(as0.BranchSizes); |
|||
branchSizes.AddRange(as1.BranchSizes); |
|||
|
|||
var asc = ActionSpec.Combine(as0, as1); |
|||
|
|||
Assert.AreEqual(as0NumCon + as1NumCon, asc.NumContinuousActions); |
|||
Assert.AreEqual(as0NumDis + as1NumDis, asc.NumDiscreteActions); |
|||
Assert.IsTrue(branchSizes.ToArray().SequenceEqual(asc.BranchSizes)); |
|||
|
|||
as0 = new ActionSpec(3); |
|||
as1 = new ActionSpec(1); |
|||
asc = ActionSpec.Combine(as0, as1); |
|||
Assert.IsEmpty(asc.BranchSizes); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 99d76ec04c944b75bc6b85abfff4ac4e |
|||
timeCreated: 1613680505 |
|
|||
{ |
|||
"m_Name": "Settings", |
|||
"m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", |
|||
"m_Dictionary": { |
|||
"m_DictionaryValues": [] |
|||
} |
|||
} |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using Unity.MLAgents.Extensions.Input; |
|||
using UnityEditor; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Editor.Input |
|||
{ |
|||
[CustomEditor(typeof(InputActuatorComponent))] |
|||
internal class InputActuatorComponentEditor : UnityEditor.Editor |
|||
{ |
|||
const string k_ActionSpecName = "m_ActionSpec"; |
|||
|
|||
public override void OnInspectorGUI() |
|||
{ |
|||
var so = serializedObject; |
|||
so.Update(); |
|||
InputActuatorComponent o = so.targetObject as InputActuatorComponent; |
|||
_ = o.ActionSpec; |
|||
EditorGUI.indentLevel++; |
|||
EditorGUI.BeginDisabledGroup(true); |
|||
EditorGUILayout.PropertyField(so.FindProperty(k_ActionSpecName)); |
|||
EditorGUI.EndDisabledGroup(); |
|||
EditorGUI.indentLevel--; |
|||
} |
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: 3435eeef4d1645be8c0f770b68f2ba19 |
|||
timeCreated: 1613637202 |
|
|||
{ |
|||
"name": "Unity.ML-Agents.Extensions.Editor.Input", |
|||
"references": [ |
|||
"Unity.ML-Agents", |
|||
"Unity.ML-Agents.Extensions.Input", |
|||
"Unity.ML-Agents.Editor", |
|||
"Unity.InputSystem" |
|||
], |
|||
"includePlatforms": [ |
|||
"Editor" |
|||
], |
|||
"excludePlatforms": [], |
|||
"allowUnsafeCode": false, |
|||
"overrideReferences": false, |
|||
"precompiledReferences": [], |
|||
"autoReferenced": true, |
|||
"defineConstraints": [], |
|||
"versionDefines": [ |
|||
{ |
|||
"name": "com.unity.inputsystem", |
|||
"expression": "1.1.0-preview", |
|||
"define": "MLA_INPUT_SYSTEM" |
|||
} |
|||
], |
|||
"noEngineReferences": false |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 4851f2d02f9f1423a8593f60b1a9cd7e |
|||
AssemblyDefinitionImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: de3fc3f4fd664e3ab579a102f7fabc88 |
|||
timeCreated: 1612204931 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.InputSystem.LowLevel; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Class that translates data between the a <see cref="UnityEngine.InputSystem.Controls.ButtonControl"/> and
|
|||
/// the ML-Agents <see cref="ActionBuffers"/> object.
|
|||
/// </summary>
|
|||
public class ButtonInputActionAdaptor : IRLActionInputAdaptor |
|||
{ |
|||
/// <summary>
|
|||
/// TODO this method needs to be more nuanced depending the types of controls that can back it. i.e. TriggerControls
|
|||
/// are continuous buttons, etc.
|
|||
/// Currently returns an <see cref="ActionSpec"/> with 1 branch of size 2. One value for not pressed, and one
|
|||
/// for pressed.
|
|||
/// </summary>
|
|||
/// <param name="action">The action associated with this adaptor to help determine the action space.</param>
|
|||
/// <returns></returns>
|
|||
public ActionSpec GetActionSpecForInputAction(InputAction action) |
|||
{ |
|||
return ActionSpec.MakeDiscrete(2); |
|||
} |
|||
|
|||
/// TODO again this might need to be more nuanced for things like continuous buttons.
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.QueueInputEventForAction"/>
|
|||
public void QueueInputEventForAction(InputAction action, InputControl control, ActionSpec actionSpec, in ActionBuffers actionBuffers) |
|||
{ |
|||
var val = actionBuffers.DiscreteActions[0]; |
|||
InputSystem.QueueDeltaStateEvent(control, (byte)val); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.WriteToHeuristic"/>>
|
|||
public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) |
|||
{ |
|||
var discreteActions = actionBuffers.DiscreteActions; |
|||
var val = action.ReadValue<float>(); |
|||
discreteActions[0] = (int)val; |
|||
} |
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: f3a0fe3f0bd446958c729d6f71e8d00b |
|||
timeCreated: 1612373241 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.InputSystem.LowLevel; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Translates data from a <see cref="UnityEngine.InputSystem.Controls.DoubleControl"/>.
|
|||
/// </summary>
|
|||
public class DoubleInputActionAdaptor : IRLActionInputAdaptor |
|||
{ |
|||
/// <inheritdoc cref="IRLActionInputAdaptor.GetActionSpecForInputAction"/>
|
|||
public ActionSpec GetActionSpecForInputAction(InputAction action) |
|||
{ |
|||
return ActionSpec.MakeContinuous(1); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.QueueInputEventForAction"/>
|
|||
public void QueueInputEventForAction(InputAction action, InputControl control, ActionSpec actionSpec, in ActionBuffers actionBuffers) |
|||
{ |
|||
var val = actionBuffers.ContinuousActions[0]; |
|||
InputSystem.QueueDeltaStateEvent(control,(double)val); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.WriteToHeuristic"/>
|
|||
public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) |
|||
{ |
|||
var actions = actionBuffers.ContinuousActions; |
|||
var val = (float)action.ReadValue<double>(); |
|||
actions[0] = val; |
|||
} |
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: 14ec2823be0a4b3bbee5490ed4840e9c |
|||
timeCreated: 1612574422 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.InputSystem.LowLevel; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Translates data from any control that extends from <see cref="InputControl{Single}"/>.
|
|||
/// </summary>
|
|||
public class FloatInputActionAdaptor : IRLActionInputAdaptor |
|||
{ |
|||
/// <inheritdoc cref="IRLActionInputAdaptor.GetActionSpecForInputAction"/>
|
|||
public ActionSpec GetActionSpecForInputAction(InputAction action) |
|||
{ |
|||
return ActionSpec.MakeContinuous(1); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.QueueInputEventForAction"/>
|
|||
public void QueueInputEventForAction(InputAction action, InputControl control, ActionSpec actionSpec, in ActionBuffers actionBuffers) |
|||
{ |
|||
var val = actionBuffers.ContinuousActions[0]; |
|||
InputSystem.QueueDeltaStateEvent(control, val); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.WriteToHeuristic"/>
|
|||
public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) |
|||
{ |
|||
var actions = actionBuffers.ContinuousActions; |
|||
var val = action.ReadValue<float>(); |
|||
actions[0] = val; |
|||
} |
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: 6c98cc3fdaec4664aae128a05cfe6560 |
|||
timeCreated: 1612573580 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.InputSystem.LowLevel; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Translates data from a <see cref="UnityEngine.InputSystem.Controls.IntegerControl"/>.
|
|||
/// </summary>
|
|||
public class IntegerInputActionAdaptor : IRLActionInputAdaptor |
|||
{ |
|||
// TODO need to figure out how we can infer the branch size from here.
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.GetActionSpecForInputAction"/>
|
|||
public ActionSpec GetActionSpecForInputAction(InputAction action) |
|||
{ |
|||
return ActionSpec.MakeDiscrete(2); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.QueueInputEventForAction"/>
|
|||
public void QueueInputEventForAction(InputAction action, InputControl control, ActionSpec actionSpec, in ActionBuffers actionBuffers) |
|||
{ |
|||
var val = actionBuffers.DiscreteActions[0]; |
|||
InputSystem.QueueDeltaStateEvent(control, val); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.WriteToHeuristic"/>
|
|||
public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) |
|||
{ |
|||
var actions = actionBuffers.DiscreteActions; |
|||
var val = action.ReadValue<int>(); |
|||
actions[0] = val; |
|||
} |
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: 592012f9a30847a29c618f0cf8addfdf |
|||
timeCreated: 1612572952 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using System; |
|||
using Unity.MLAgents.Actuators; |
|||
using UnityEngine; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.InputSystem.LowLevel; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Translates data from any control that extends from <see cref="InputControl{Vector2}"/>.
|
|||
/// </summary>
|
|||
public class Vector2InputActionAdaptor : IRLActionInputAdaptor |
|||
{ |
|||
/// <inheritdoc cref="IRLActionInputAdaptor.GetActionSpecForInputAction"/>
|
|||
public ActionSpec GetActionSpecForInputAction(InputAction action) |
|||
{ |
|||
// TODO create the action spec based on what controls back the action
|
|||
return ActionSpec.MakeContinuous(2); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.QueueInputEventForAction"/>
|
|||
public void QueueInputEventForAction(InputAction action, |
|||
InputControl control, |
|||
ActionSpec actionSpec, |
|||
in ActionBuffers actionBuffers) |
|||
{ |
|||
var x = actionBuffers.ContinuousActions[0]; |
|||
var y = actionBuffers.ContinuousActions[1]; |
|||
InputSystem.QueueDeltaStateEvent(control, new Vector2(x, y)); |
|||
} |
|||
|
|||
/// <inheritdoc cref="IRLActionInputAdaptor.WriteToHeuristic"/>
|
|||
public void WriteToHeuristic(InputAction action, in ActionBuffers actionBuffers) |
|||
{ |
|||
var value = action.ReadValue<Vector2>(); |
|||
var continuousActions = actionBuffers.ContinuousActions; |
|||
continuousActions[0] = value.x; |
|||
continuousActions[1] = value.y; |
|||
} |
|||
|
|||
} |
|||
} |
|||
#endif // MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|
|||
fileFormatVersion: 2 |
|||
guid: aa311fde3dac44f3b7998bb7fee77225 |
|||
timeCreated: 1611356491 |
|
|||
using System.Runtime.CompilerServices; |
|||
|
|||
[assembly: InternalsVisibleTo("Unity.ML-Agents.Extensions.Input.Tests.Runtime")] |
|
|||
fileFormatVersion: 2 |
|||
guid: 989e62db4b694586bf2c832ce13e2d50 |
|||
timeCreated: 1612916938 |
|
|||
#if MLA_INPUT_SYSTEM && UNITY_2019_4_OR_NEWER
|
|||
using UnityEngine.InputSystem; |
|||
|
|||
namespace Unity.MLAgents.Extensions.Input |
|||
{ |
|||
/// <summary>
|
|||
/// Implement this interface if you are listening to C# events from the generated C# class from the
|
|||
/// <see cref="InputActionAsset"/>. This interface works with the <see cref="InputActuatorComponent"/> in order
|
|||
/// to allow ML-Agents to simulate input actions based on the instance of the <see cref="InputActionAsset"/>
|
|||
/// used to listen to events. If you implement this interface the <see cref="InputActuatorComponent"/> will use
|
|||
/// what is returned from <see cref="GetInputActionAsset"/> as the asset to base it's simulated input for.
|
|||
/// Otherwise, the <see cref="InputActuatorComponent"/> will look for the <see cref="PlayerInput"/> component
|
|||
/// and use the asset from there. If you have multiple components handling PlayerInput on the same GameObject
|
|||
/// they will need to share the same instance of the <see cref="InputActionAsset"/> in order to get the simulated
|
|||
/// input.
|
|||
/// </summary>
|
|||
public interface IInputActionAssetProvider |
|||
{ |
|||
/// <summary>
|
|||
|