浏览代码

move CacheBrainParameters() and friends out of #if blocks (#2777)

/develop-gpu-test
GitHub 5 年前
当前提交
daf6b394
共有 1 个文件被更改,包括 17 次插入17 次删除
  1. 34
      UnitySDK/Assets/ML-Agents/Scripts/Grpc/RpcCommunicator.cs

34
UnitySDK/Assets/ML-Agents/Scripts/Grpc/RpcCommunicator.cs


};
}
#endregion
#if UNITY_EDITOR
#if UNITY_2017_2_OR_NEWER
/// <summary>
/// When the editor exits, the communicator must be closed
/// </summary>
/// <param name="state">State.</param>
private void HandleOnPlayModeChanged(PlayModeStateChange state)
{
// This method is run whenever the playmode state is changed.
if (state == PlayModeStateChange.ExitingPlayMode)
{
Dispose();
}
}
private void CacheBrainParameters(string brainKey, BrainParameters brainParameters)
{
if (m_sentBrainKeys.Contains(brainKey))

{
m_sentBrainKeys.Add(brainProto.BrainName);
m_unsentBrainKeys.Remove(brainProto.BrainName);
}
}
#endregion
#if UNITY_EDITOR
#if UNITY_2017_2_OR_NEWER
/// <summary>
/// When the editor exits, the communicator must be closed
/// </summary>
/// <param name="state">State.</param>
private void HandleOnPlayModeChanged(PlayModeStateChange state)
{
// This method is run whenever the playmode state is changed.
if (state == PlayModeStateChange.ExitingPlayMode)
{
Dispose();
}
}

正在加载...
取消
保存