示例#1
0
 public void MergeFrom(UnityMessage other)
 {
     if (other == null)
     {
         return;
     }
     if (other.header_ != null)
     {
         if (header_ == null)
         {
             Header = new global::mlagentsdev.CommunicatorObjects.Header();
         }
         Header.MergeFrom(other.Header);
     }
     if (other.unityOutput_ != null)
     {
         if (unityOutput_ == null)
         {
             UnityOutput = new global::mlagentsdev.CommunicatorObjects.UnityOutput();
         }
         UnityOutput.MergeFrom(other.UnityOutput);
     }
     if (other.unityInput_ != null)
     {
         if (unityInput_ == null)
         {
             UnityInput = new global::mlagentsdev.CommunicatorObjects.UnityInput();
         }
         UnityInput.MergeFrom(other.UnityInput);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#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 (header_ == null)
                    {
                        Header = new global::mlagentsdev.CommunicatorObjects.Header();
                    }
                    input.ReadMessage(Header);
                    break;
                }

                case 18: {
                    if (unityOutput_ == null)
                    {
                        UnityOutput = new global::mlagentsdev.CommunicatorObjects.UnityOutput();
                    }
                    input.ReadMessage(UnityOutput);
                    break;
                }

                case 26: {
                    if (unityInput_ == null)
                    {
                        UnityInput = new global::mlagentsdev.CommunicatorObjects.UnityInput();
                    }
                    input.ReadMessage(UnityInput);
                    break;
                }
                }
            }
        }