|
1 | 1 | # Upgrading
|
2 | 2 |
|
3 |
| -## :warning: Warning :warning: |
4 |
| - |
5 |
| -The C# editor code and python trainer code are not compatible between releases. |
6 |
| -This means that if you upgrade one, you _must_ upgrade the other as well. If you |
7 |
| -experience new errors or unable to connect to training after updating, please |
8 |
| -double-check that the versions are in the same. The versions can be found in |
9 |
| - |
10 |
| -- `Academy.k_ApiVersion` in Academy.cs |
11 |
| - ([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs#L95)) |
12 |
| -- `UnityEnvironment.API_VERSION` in environment.py |
13 |
| - ([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/ml-agents-envs/mlagents/envs/environment.py#L45)) |
14 |
| - |
15 |
| - |
16 | 3 | # Migrating
|
17 | 4 | ## Migrating the package to version 2.0
|
18 | 5 | - The official version of Unity ML-Agents supports is now 2019.4 LTS. If you run
|
19 | 6 | into issues, please consider deleting your project's Library folder and reponening your
|
20 | 7 | project.
|
21 | 8 | - If you used any of the APIs that were deprecated before version 2.0, you need to use their replacement. These
|
22 | 9 | deprecated APIs have been removed. See the migration steps bellow for specific API replacements.
|
| 10 | + |
| 11 | +### Deprecated methods removed |
| 12 | +| **Deprecated API** | **Suggested Replacement** | |
| 13 | +|:-------:|:------:| |
| 14 | +| `IActuator ActuatorComponent.CreateActuator()` | `IActuator[] ActuatorComponent.CreateActuators()` | |
| 15 | +| `IActionReceiver.PackActions(in float[] destination)` | none | |
| 16 | +| `Agent.CollectDiscreteActionMasks(DiscreteActionMasker actionMasker)` | `Agent.WriteDiscreteActionMask(IDiscreteActionMask actionMask)` | |
| 17 | +| `Agent.Heuristic(float[] actionsOut)` | `Agent.Heuristic(in ActionBuffers actionsOut)` | |
| 18 | +| `Agent.OnActionReceived(float[] vectorAction)` | `Agent.OnActionReceived(ActionBuffers actions)` | |
| 19 | +| `Agent.GetAction()` | `Agent.GetStoredActionBuffers()` | |
| 20 | +| `BrainParameters.SpaceType`, `VectorActionSize`, `VectorActionSpaceType`, and `NumActions` | `BrainParameters.ActionSpec` | |
| 21 | +| `ObservationWriter.AddRange(IEnumerable<float> data, int writeOffset = 0)` | `ObservationWriter. AddList(IList<float> data, int writeOffset = 0` | |
| 22 | +| `SensorComponent.IsVisual()` and `IsVector()` | none | |
| 23 | +| `VectorSensor.AddObservation(IEnumerable<float> observation)` | `VectorSensor.AddObservation(IList<float> observation)` | |
| 24 | +| `SideChannelsManager` | `SideChannelManager` | |
| 25 | + |
23 | 26 | ### IDiscreteActionMask changes
|
24 | 27 | - The interface for disabling specific discrete actions has changed. `IDiscreteActionMask.WriteMask()` was removed,
|
25 | 28 | and replaced with `SetActionEnabled()`. Instead of returning an IEnumerable with indices to disable, you can
|
|
0 commit comments