浏览代码

only set deadline for editor

/develop/windows-delay
Ruo-Ping Dong 4 年前
当前提交
44eeb280
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 2
      com.unity.ml-agents/Runtime/Academy.cs
  2. 6
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs

2
com.unity.ml-agents/Runtime/Academy.cs


{
// We try to exchange the first message with Python. If this fails, it means
// no Python Process is ready to train the environment. In this case, the
//environment must use Inference.
// environment must use Inference.
try
{
var unityRlInitParameters = Communicator.Initialize(

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


ChannelCredentials.Insecure);
m_Client = new UnityToExternalProto.UnityToExternalProtoClient(channel);
var result = m_Client.Exchange(WrapMessage(unityOutput, 200), deadline: DateTime.Now.AddSeconds(1));
#if UNITY_EDITOR
var result = m_Client.Exchange(WrapMessage(unityOutput, 200), deadline: DateTime.Now.AddSeconds(10000));
#else
var result = m_Client.Exchange(WrapMessage(unityOutput, 200));
#endif
var inputMessage = m_Client.Exchange(WrapMessage(null, 200));
unityInput = inputMessage.UnityInput;
#if UNITY_EDITOR

正在加载...
取消
保存