[Closed]How to Build and Deploy to the Android device from the script

There’s not any problem anymore, it started suddently working with my orginal code. :S

Hi, I made automated building script and it builds the .apk file nicely. Now I would like if it would deploy it right away to the device. I didn’t find any help from other forum posts neither from documentation.

I’m using BuildPipeline.Buildplayer()-function for building and I tried AutoRunPlayer-option but it didn’t work.

BuildPipeline.BuildPlayer(GetScenePaths(), path, BuildTarget.Android, BuildOptions.AutoRunPlayer);

So, is there a way to deploy my fresh build straight to the device from script?

I certainly do… and I do it exactly as you’ve done it. Although I have not tried it with the latest Unity and Android libs maybe it’s broken recently?

Does Build & Run automatically deploy? If that fails to work too then something else might be wrong.