Exemplo n.º 1
0
        public void MergeFrom(ObservationProto other)
        {
            if (other == null)
            {
                return;
            }
            shape_.Add(other.shape_);
            if (other.CompressionType != global::MLAgents.CommunicatorObjects.CompressionTypeProto.None)
            {
                CompressionType = other.CompressionType;
            }
            switch (other.ObservationDataCase)
            {
            case ObservationDataOneofCase.CompressedData:
                CompressedData = other.CompressedData;
                break;

            case ObservationDataOneofCase.FloatData:
                if (FloatData == null)
                {
                    FloatData = new global::MLAgents.CommunicatorObjects.ObservationProto.Types.FloatData();
                }
                FloatData.MergeFrom(other.FloatData);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public void MergeFrom(ObservationProto other)
        {
            if (other == null)
            {
                return;
            }
            shape_.Add(other.shape_);
            if (other.CompressionType != 0)
            {
                CompressionType = other.CompressionType;
            }
            compressedChannelMapping_.Add(other.compressedChannelMapping_);
            dimensionProperties_.Add(other.dimensionProperties_);
            if (other.ObservationType != 0)
            {
                ObservationType = other.ObservationType;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            switch (other.ObservationDataCase)
            {
            case ObservationDataOneofCase.CompressedData:
                CompressedData = other.CompressedData;
                break;

            case ObservationDataOneofCase.FloatData:
                if (FloatData == null)
                {
                    FloatData = new global::Unity.MLAgents.CommunicatorObjects.ObservationProto.Types.FloatData();
                }
                FloatData.MergeFrom(other.FloatData);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }