浏览代码

Update mac and linux native and managed libraries. Fix shutdown issues. Delete link.xml.

/develop/update-grpc
Christopher Goy 4 年前
当前提交
886e4213
共有 8 个文件被更改,包括 474 次插入489 次删除
  1. 907
      com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
  2. 20
      com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta
  3. 19
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
  4. 10
      com.unity.ml-agents/Plugins/ProtoBuffer/link.xml
  5. 7
      com.unity.ml-agents/Plugins/ProtoBuffer/link.xml.meta

907
com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
文件差异内容过多而无法显示
查看文件

20
com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta


iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isPreloaded: 1
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1

Exclude OSXIntel: 0
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 1
- first:
: OSXIntel

second:
enabled: 1
settings:
CPU: x86_64
CPU: AnyCPU
DefaultValueInitialized: true
OS: OSX
- first:

second:
enabled: 0
settings:
CPU: AnyCPU
CPU: None
- first:
Standalone: LinuxUniversal
second:

second:
enabled: 1
settings:
CPU: AnyCPU
CPU: x86_64
enabled: 0
enabled: 1
CPU: AnyCPU
CPU: None
enabled: 0
enabled: 1
CPU: AnyCPU
CPU: None
- first:
iPhone: iOS
second:

19
com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs


#define MLA_SUPPORTED_TRAINING_PLATFORM
#endif
# if MLA_SUPPORTED_TRAINING_PLATFORM
#if MLA_SUPPORTED_TRAINING_PLATFORM
using Grpc.Core;
#if UNITY_EDITOR
using UnityEditor;

UpdateEnvironmentWithInput(input.RlInput);
initParametersOut = initializationInput.RlInitializationInput.ToUnityRLInitParameters();
// Be sure to shut down the grpc channel when the application is quitting.
Application.quitting += NotifyQuitAndShutDownChannel;
return true;
#else
initParametersOut = new UnityRLInitParameters();

if (result.Header.Status != 200 || inputMessage.Header.Status != 200)
{
m_IsOpen = false;
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
void NotifyQuitAndShutDownChannel()
{
QuitCommandReceived?.Invoke();
m_Channel.ShutdownAsync().Wait();
}
#endregion
#region Destruction

try
{
m_Client.Exchange(WrapMessage(null, 400));
m_Channel.ShutdownAsync().Wait();
m_IsOpen = false;
}
catch

{
case CommandProto.Quit:
{
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return;
}
case CommandProto.Reset:

// Not sure if the quit command is actually sent when a
// non 200 message is received. Notify that we are indeed
// quitting.
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return message.UnityInput;
}
catch (Exception ex)

}
m_IsOpen = false;
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return null;
}
}

10
com.unity.ml-agents/Plugins/ProtoBuffer/link.xml


<?xml version="1.0" encoding="utf-8"?>
<linker>
<!--
Prevents Managed code stripping from removing code necessary for training.
You may wish to disable this preservation (that is, re-enable code stripping) to
reduce code size if you no longer need training.
See also https://docs.unity3d.com/Manual/ManagedCodeStripping.html
-->
<assembly fullname="Grpc.Core" preserve="all"/>
</linker>

7
com.unity.ml-agents/Plugins/ProtoBuffer/link.xml.meta


fileFormatVersion: 2
guid: f94355fa6eab94c2d8529747b92ca3e1
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存