public Builder mergeFrom(org.bwapi.proxy.messages.GameMessages.Unit other) {
        if (other == org.bwapi.proxy.messages.GameMessages.Unit.getDefaultInstance()) return this;
        if (other.hasTheID()) {
          mergeTheID(other.getTheID());
        }
        if (other.hasPlayer()) {
          setPlayer(other.getPlayer());
        }
        if (other.hasType()) {
          mergeType(other.getType());
        }
        if (other.hasInitialType()) {
          mergeInitialType(other.getInitialType());
        }
        if (other.hasHitPoints()) {
          setHitPoints(other.getHitPoints());
        }
        if (other.hasInitialHitPoints()) {
          setInitialHitPoints(other.getInitialHitPoints());
        }
        if (other.hasShields()) {
          setShields(other.getShields());
        }
        if (other.hasEnergy()) {
          setEnergy(other.getEnergy());
        }
        if (other.hasResources()) {
          setResources(other.getResources());
        }
        if (other.hasResourceGroup()) {
          setResourceGroup(other.getResourceGroup());
        }
        if (other.hasInitialResources()) {
          setInitialResources(other.getInitialResources());
        }
        if (other.hasKillCount()) {
          setKillCount(other.getKillCount());
        }
        if (other.hasGroundWeaponCooldown()) {
          setGroundWeaponCooldown(other.getGroundWeaponCooldown());
        }
        if (other.hasAirWeaponCooldown()) {
          setAirWeaponCooldown(other.getAirWeaponCooldown());
        }
        if (other.hasSpellCooldown()) {
          setSpellCooldown(other.getSpellCooldown());
        }
        if (other.hasDefenseMatrixPoints()) {
          setDefenseMatrixPoints(other.getDefenseMatrixPoints());
        }
        if (other.hasDefenseMatrixTimer()) {
          setDefenseMatrixTimer(other.getDefenseMatrixTimer());
        }
        if (other.hasEnsnareTimer()) {
          setEnsnareTimer(other.getEnsnareTimer());
        }
        if (other.hasIrradiateTimer()) {
          setIrradiateTimer(other.getIrradiateTimer());
        }
        if (other.hasLockdownTimer()) {
          setLockdownTimer(other.getLockdownTimer());
        }
        if (other.hasMaelstromTimer()) {
          setMaelstromTimer(other.getMaelstromTimer());
        }
        if (other.hasPlagueTimer()) {
          setPlagueTimer(other.getPlagueTimer());
        }
        if (other.hasRemoveTimer()) {
          setRemoveTimer(other.getRemoveTimer());
        }
        if (other.hasStasisTimer()) {
          setStasisTimer(other.getStasisTimer());
        }
        if (other.hasStimTimer()) {
          setStimTimer(other.getStimTimer());
        }
        if (other.hasPosition()) {
          mergePosition(other.getPosition());
        }
        if (other.hasInitialPosition()) {
          mergeInitialPosition(other.getInitialPosition());
        }
        if (other.hasTilePosition()) {
          mergeTilePosition(other.getTilePosition());
        }
        if (other.hasInitialTilePosition()) {
          mergeInitialTilePosition(other.getInitialTilePosition());
        }
        if (other.hasAngle()) {
          setAngle(other.getAngle());
        }
        if (other.hasVelocityX()) {
          setVelocityX(other.getVelocityX());
        }
        if (other.hasVelocityY()) {
          setVelocityY(other.getVelocityY());
        }
        if (other.hasTarget()) {
          mergeTarget(other.getTarget());
        }
        if (other.hasTargetPosition()) {
          mergeTargetPosition(other.getTargetPosition());
        }
        if (other.hasOrder()) {
          setOrder(other.getOrder());
        }
        if (other.hasOrderTarget()) {
          mergeOrderTarget(other.getOrderTarget());
        }
        if (other.hasOrderTimer()) {
          setOrderTimer(other.getOrderTimer());
        }
        if (other.hasSecondaryOrder()) {
          setSecondaryOrder(other.getSecondaryOrder());
        }
        if (other.hasBuildUnit()) {
          mergeBuildUnit(other.getBuildUnit());
        }
        if (other.hasRemainingBuildTime()) {
          setRemainingBuildTime(other.getRemainingBuildTime());
        }
        if (other.hasRemainingTrainTime()) {
          setRemainingTrainTime(other.getRemainingTrainTime());
        }
        if (trainingQueueBuilder_ == null) {
          if (!other.trainingQueue_.isEmpty()) {
            if (trainingQueue_.isEmpty()) {
              trainingQueue_ = other.trainingQueue_;
              bitField1_ = (bitField1_ & ~0x00000200);
            } else {
              ensureTrainingQueueIsMutable();
              trainingQueue_.addAll(other.trainingQueue_);
            }
            onChanged();
          }
        } else {
          if (!other.trainingQueue_.isEmpty()) {
            if (trainingQueueBuilder_.isEmpty()) {
              trainingQueueBuilder_.dispose();
              trainingQueueBuilder_ = null;
              trainingQueue_ = other.trainingQueue_;
              bitField1_ = (bitField1_ & ~0x00000200);
              trainingQueueBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getTrainingQueueFieldBuilder() : null;
            } else {
              trainingQueueBuilder_.addAllMessages(other.trainingQueue_);
            }
          }
        }
        if (other.hasTransport()) {
          mergeTransport(other.getTransport());
        }
        if (loadedUnitsBuilder_ == null) {
          if (!other.loadedUnits_.isEmpty()) {
            if (loadedUnits_.isEmpty()) {
              loadedUnits_ = other.loadedUnits_;
              bitField1_ = (bitField1_ & ~0x00000800);
            } else {
              ensureLoadedUnitsIsMutable();
              loadedUnits_.addAll(other.loadedUnits_);
            }
            onChanged();
          }
        } else {
          if (!other.loadedUnits_.isEmpty()) {
            if (loadedUnitsBuilder_.isEmpty()) {
              loadedUnitsBuilder_.dispose();
              loadedUnitsBuilder_ = null;
              loadedUnits_ = other.loadedUnits_;
              bitField1_ = (bitField1_ & ~0x00000800);
              loadedUnitsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getLoadedUnitsFieldBuilder() : null;
            } else {
              loadedUnitsBuilder_.addAllMessages(other.loadedUnits_);
            }
          }
        }
        if (other.hasInterceptorCount()) {
          setInterceptorCount(other.getInterceptorCount());
        }
        if (other.hasScarabCount()) {
          setScarabCount(other.getScarabCount());
        }
        if (other.hasSpiderMineCount()) {
          setSpiderMineCount(other.getSpiderMineCount());
        }
        if (other.hasTech()) {
          setTech(other.getTech());
        }
        if (other.hasUpgrade()) {
          setUpgrade(other.getUpgrade());
        }
        if (other.hasRemainingResearchTime()) {
          setRemainingResearchTime(other.getRemainingResearchTime());
        }
        if (other.hasRemainingUpgradeTime()) {
          setRemainingUpgradeTime(other.getRemainingUpgradeTime());
        }
        if (other.hasRallyPosition()) {
          mergeRallyPosition(other.getRallyPosition());
        }
        if (other.hasRallyUnit()) {
          mergeRallyUnit(other.getRallyUnit());
        }
        if (other.hasAddon()) {
          mergeAddon(other.getAddon());
        }
        if (other.hasCarrier()) {
          mergeCarrier(other.getCarrier());
        }
        if (interceptorsBuilder_ == null) {
          if (!other.interceptors_.isEmpty()) {
            if (interceptors_.isEmpty()) {
              interceptors_ = other.interceptors_;
              bitField1_ = (bitField1_ & ~0x00800000);
            } else {
              ensureInterceptorsIsMutable();
              interceptors_.addAll(other.interceptors_);
            }
            onChanged();
          }
        } else {
          if (!other.interceptors_.isEmpty()) {
            if (interceptorsBuilder_.isEmpty()) {
              interceptorsBuilder_.dispose();
              interceptorsBuilder_ = null;
              interceptors_ = other.interceptors_;
              bitField1_ = (bitField1_ & ~0x00800000);
              interceptorsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getInterceptorsFieldBuilder() : null;
            } else {
              interceptorsBuilder_.addAllMessages(other.interceptors_);
            }
          }
        }
        if (other.hasNydusExit()) {
          mergeNydusExit(other.getNydusExit());
        }
        if (other.hasExists()) {
          setExists(other.getExists());
        }
        if (other.hasHasNuke()) {
          setHasNuke(other.getHasNuke());
        }
        if (other.hasAccelerating()) {
          setAccelerating(other.getAccelerating());
        }
        if (other.hasBeingConstructed()) {
          setBeingConstructed(other.getBeingConstructed());
        }
        if (other.hasBeingHealed()) {
          setBeingHealed(other.getBeingHealed());
        }
        if (other.hasBlind()) {
          setBlind(other.getBlind());
        }
        if (other.hasBraking()) {
          setBraking(other.getBraking());
        }
        if (other.hasBurrowed()) {
          setBurrowed(other.getBurrowed());
        }
        if (other.hasCarryingGas()) {
          setCarryingGas(other.getCarryingGas());
        }
        if (other.hasCarryingMinerals()) {
          setCarryingMinerals(other.getCarryingMinerals());
        }
        if (other.hasCloaked()) {
          setCloaked(other.getCloaked());
        }
        if (other.hasCompleted()) {
          setCompleted(other.getCompleted());
        }
        if (other.hasConstructing()) {
          setConstructing(other.getConstructing());
        }
        if (other.hasDefenseMatrixed()) {
          setDefenseMatrixed(other.getDefenseMatrixed());
        }
        if (other.hasEnsnared()) {
          setEnsnared(other.getEnsnared());
        }
        if (other.hasFollowing()) {
          setFollowing(other.getFollowing());
        }
        if (other.hasGatheringGas()) {
          setGatheringGas(other.getGatheringGas());
        }
        if (other.hasGatheringMinerals()) {
          setGatheringMinerals(other.getGatheringMinerals());
        }
        if (other.hasHallucination()) {
          setHallucination(other.getHallucination());
        }
        if (other.hasIdle()) {
          setIdle(other.getIdle());
        }
        if (other.hasIrradiated()) {
          setIrradiated(other.getIrradiated());
        }
        if (other.hasLifted()) {
          setLifted(other.getLifted());
        }
        if (other.hasLoaded()) {
          setLoaded(other.getLoaded());
        }
        if (other.hasLockedDown()) {
          setLockedDown(other.getLockedDown());
        }
        if (other.hasMaelstrommed()) {
          setMaelstrommed(other.getMaelstrommed());
        }
        if (other.hasMorphing()) {
          setMorphing(other.getMorphing());
        }
        if (other.hasMoving()) {
          setMoving(other.getMoving());
        }
        if (other.hasParasited()) {
          setParasited(other.getParasited());
        }
        if (other.hasPatrolling()) {
          setPatrolling(other.getPatrolling());
        }
        if (other.hasPlagued()) {
          setPlagued(other.getPlagued());
        }
        if (other.hasRepairing()) {
          setRepairing(other.getRepairing());
        }
        if (other.hasResearching()) {
          setResearching(other.getResearching());
        }
        if (other.hasSelected()) {
          setSelected(other.getSelected());
        }
        if (other.hasSieged()) {
          setSieged(other.getSieged());
        }
        if (other.hasStartingAttack()) {
          setStartingAttack(other.getStartingAttack());
        }
        if (other.hasStasised()) {
          setStasised(other.getStasised());
        }
        if (other.hasStimmed()) {
          setStimmed(other.getStimmed());
        }
        if (other.hasTraining()) {
          setTraining(other.getTraining());
        }
        if (other.hasUnderStorm()) {
          setUnderStorm(other.getUnderStorm());
        }
        if (other.hasUnderAttack()) {
          setUnderAttack(other.getUnderAttack());
        }
        if (other.hasUnderDarkSwarm()) {
          setUnderDarkSwarm(other.getUnderDarkSwarm());
        }
        if (other.hasUnpowered()) {
          setUnpowered(other.getUnpowered());
        }
        if (other.hasUpgrading()) {
          setUpgrading(other.getUpgrading());
        }
        if (other.hasVisible()) {
          setVisible(other.getVisible());
        }
        if (other.hasBeingGathered()) {
          setBeingGathered(other.getBeingGathered());
        }
        if (larvaeBuilder_ == null) {
          if (!other.larvae_.isEmpty()) {
            if (larvae_.isEmpty()) {
              larvae_ = other.larvae_;
              bitField3_ = (bitField3_ & ~0x00000040);
            } else {
              ensureLarvaeIsMutable();
              larvae_.addAll(other.larvae_);
            }
            onChanged();
          }
        } else {
          if (!other.larvae_.isEmpty()) {
            if (larvaeBuilder_.isEmpty()) {
              larvaeBuilder_.dispose();
              larvaeBuilder_ = null;
              larvae_ = other.larvae_;
              bitField3_ = (bitField3_ & ~0x00000040);
              larvaeBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   getLarvaeFieldBuilder() : null;
            } else {
              larvaeBuilder_.addAllMessages(other.larvae_);
            }
          }
        }
        if (other.hasHatchery()) {
          mergeHatchery(other.getHatchery());
        }
        if (other.hasBuildType()) {
          mergeBuildType(other.getBuildType());
        }
        if (other.hasDetected()) {
          setDetected(other.getDetected());
        }
        if (other.hasAttacking()) {
          setAttacking(other.getAttacking());
        }
        if (other.hasAttackFrame()) {
          setAttackFrame(other.getAttackFrame());
        }
        if (other.hasStuck()) {
          setStuck(other.getStuck());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }