BuildPlayer at runtime

Hi! Please tell me can I invoke BuildPipeline.BuildPlayer() method from scripts not in Editor folder? I wanna just click to button (I mean GUI.Button()) and use this method.

you mean something like:

if(GUI.Button("I'm a button"))
   BuildPipeline.BuildPlayer(arguments_here);