Mega Evolution vs Switching Out Order

pokemon-sixth-generation

If I mega evolve Charizard to Mega Charizard Y the same turn my opponent recalls his Pokemon and sends out Tyranitar with Sandstream, whose weather effect will end up persisting? Will the Sandstorm, or the Sun be the final weather condition that stays?

Best Answer

Switching always happens first so the sun from Drought will replace the sand.