浏览代码

fix compile warnings for using obsolete enum (#4812)

/MLA-1734-demo-provider
GitHub 4 年前
当前提交
ea3f8868
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 1
      com.unity.ml-agents/CHANGELOG.md
  2. 3
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs

1
com.unity.ml-agents/CHANGELOG.md


### Bug Fixes
#### com.unity.ml-agents (C#)
- Fix a compile warning about using an obsolete enum in `GrpcExtensions.cs`. (#4812)
#### ml-agents / ml-agents-envs / gym-unity (Python)

3
com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs


ActionSpec actionSpec;
if (bpp.ActionSpec == null)
{
// Disable deprecation warnings so we can set legacy fields
#pragma warning disable CS0618
var spaceType = (SpaceType)bpp.VectorActionSpaceTypeDeprecated;
if (spaceType == SpaceType.Continuous)
{

{
actionSpec = ActionSpec.MakeDiscrete(bpp.VectorActionSizeDeprecated.ToArray());
}
#pragma warning restore CS0618
}
else
{

正在加载...
取消
保存