Beispiel #1
0
 public void MergeFrom(UnityRLInitializationOutput other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Version.Length != 0)
     {
         Version = other.Version;
     }
     if (other.LogPath.Length != 0)
     {
         LogPath = other.LogPath;
     }
     brainParameters_.Add(other.brainParameters_);
     if (other.environmentParameters_ != null)
     {
         if (environmentParameters_ == null)
         {
             EnvironmentParameters = new global::mlagentsdev.CommunicatorObjects.EnvironmentParametersProto();
         }
         EnvironmentParameters.MergeFrom(other.EnvironmentParameters);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 public void MergeFrom(UnityRLInput other)
 {
     if (other == null)
     {
         return;
     }
     agentActions_.Add(other.agentActions_);
     if (other.environmentParameters_ != null)
     {
         if (environmentParameters_ == null)
         {
             EnvironmentParameters = new global::mlagentsdev.CommunicatorObjects.EnvironmentParametersProto();
         }
         EnvironmentParameters.MergeFrom(other.EnvironmentParameters);
     }
     if (other.IsTraining != false)
     {
         IsTraining = other.IsTraining;
     }
     if (other.Command != 0)
     {
         Command = other.Command;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Beispiel #3
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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    Version = input.ReadString();
                    break;
                }

                case 26: {
                    LogPath = input.ReadString();
                    break;
                }

                case 42: {
                    brainParameters_.AddEntriesFrom(input, _repeated_brainParameters_codec);
                    break;
                }

                case 50: {
                    if (environmentParameters_ == null)
                    {
                        EnvironmentParameters = new global::mlagentsdev.CommunicatorObjects.EnvironmentParametersProto();
                    }
                    input.ReadMessage(EnvironmentParameters);
                    break;
                }
                }
            }
        }
        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: {
                    agentActions_.AddEntriesFrom(input, _map_agentActions_codec);
                    break;
                }

                case 18: {
                    if (environmentParameters_ == null)
                    {
                        EnvironmentParameters = new global::mlagentsdev.CommunicatorObjects.EnvironmentParametersProto();
                    }
                    input.ReadMessage(EnvironmentParameters);
                    break;
                }

                case 24: {
                    IsTraining = input.ReadBool();
                    break;
                }

                case 32: {
                    Command = (global::mlagentsdev.CommunicatorObjects.CommandProto)input.ReadEnum();
                    break;
                }
                }
            }
        }