|
|
|
|
|
|
Dictionary<string, ActionSpec> m_UnsentBrainKeys = new Dictionary<string, ActionSpec>(); |
|
|
|
|
|
|
|
|
|
|
|
#if MLA_SUPPORTED_TRAINING_PLATFORM
|
|
|
|
/// The Unity to External client.
|
|
|
|
UnityToExternalProto.UnityToExternalProtoClient m_Client; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityInputProto Initialize(int port, UnityOutputProto unityOutput, out UnityInputProto unityInput) |
|
|
|
{ |
|
|
|
#if MLA_SUPPORTED_TRAINING_PLATFORM
|
|
|
|
m_IsOpen = true; |
|
|
|
var channel = new Channel($"localhost:{port}", ChannelCredentials.Insecure); |
|
|
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
#if MLA_SUPPORTED_TRAINING_PLATFORM
|
|
|
|
if (!m_IsOpen) |
|
|
|
{ |
|
|
|
return; |
|
|
|
|
|
|
/// <param name="unityOutput">The UnityOutput to be sent.</param>
|
|
|
|
UnityInputProto Exchange(UnityOutputProto unityOutput) |
|
|
|
{ |
|
|
|
#if MLA_SUPPORTED_TRAINING_PLATFORM
|
|
|
|
if (!m_IsOpen) |
|
|
|
{ |
|
|
|
return null; |
|
|
|