Switch Editor Platform from Script

Is there a way to switch Editor target platform from Script?

What I want to do is build a lot of assetBundles (which target is WebPlayer) and when done I want my Editor to be back at PC and Mac Standalone mode and not Web Player mode.

It will be part of my custom project "builder".

Use the `SwitchActiveBuildTarget()` method.

EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneOSXIntel);