public void MergeFrom(AgentActionProto other) { if (other == null) { return; } vectorActions_.Add(other.vectorActions_); if (other.TextActions.Length != 0) { TextActions = other.TextActions; } memories_.Add(other.memories_); if (other.Value != 0F) { Value = other.Value; } if (other.customAction_ != null) { if (customAction_ == null) { CustomAction = new global::MLAgents.CommunicatorObjects.CustomAction(); } CustomAction.MergeFrom(other.CustomAction); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
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: case 13: { vectorActions_.AddEntriesFrom(input, _repeated_vectorActions_codec); break; } case 18: { TextActions = input.ReadString(); break; } case 26: case 29: { memories_.AddEntriesFrom(input, _repeated_memories_codec); break; } case 37: { Value = input.ReadFloat(); break; } case 42: { if (customAction_ == null) { CustomAction = new global::MLAgents.CommunicatorObjects.CustomAction(); } input.ReadMessage(CustomAction); break; } } } }