Exemplo n.º 1
0
 public void MergeFrom(UnityInput other)
 {
     if (other == null)
     {
         return;
     }
     if (other.rlInput_ != null)
     {
         if (rlInput_ == null)
         {
             RlInput = new global::MLAgents.CommunicatorObjects.UnityRLInput();
         }
         RlInput.MergeFrom(other.RlInput);
     }
     if (other.rlInitializationInput_ != null)
     {
         if (rlInitializationInput_ == null)
         {
             RlInitializationInput = new global::MLAgents.CommunicatorObjects.UnityRLInitializationInput();
         }
         RlInitializationInput.MergeFrom(other.RlInitializationInput);
     }
     if (other.rlResetInput_ != null)
     {
         if (rlResetInput_ == null)
         {
             RlResetInput = new global::MLAgents.CommunicatorObjects.UnityRLResetInput();
         }
         RlResetInput.MergeFrom(other.RlResetInput);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (rlInput_ == null)
                    {
                        RlInput = new global::MLAgents.CommunicatorObjects.UnityRLInput();
                    }
                    input.ReadMessage(RlInput);
                    break;
                }

                case 18: {
                    if (rlInitializationInput_ == null)
                    {
                        RlInitializationInput = new global::MLAgents.CommunicatorObjects.UnityRLInitializationInput();
                    }
                    input.ReadMessage(RlInitializationInput);
                    break;
                }

                case 26: {
                    if (rlResetInput_ == null)
                    {
                        RlResetInput = new global::MLAgents.CommunicatorObjects.UnityRLResetInput();
                    }
                    input.ReadMessage(RlResetInput);
                    break;
                }
                }
            }
        }