简体   繁体   中英

Automated Unity iOS build on Mac

I am doing the iOS builds for a group of Unity (Unity3d) game developers.

After pulling the latest git updates, I start up the Unity editor on my Mac and choose "Build Settings", select the iOS target platform, press Build, specify a destination folder and that is it.

Can this exact process be done automatically via the terminal prompt?

What you would need to do is create an editor method in Unity that does the iOS building:

http://docs.unity3d.com/Documentation/ScriptReference/BuildPipeline.BuildPlayer.html

And then call that method via the Unity command line arguments.

http://docs.unity3d.com/Documentation/Manual/CommandLineArguments.html

/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod MyEditorScript.MyMethod

As Calvin said, you can use the executeMethod switch of Unity's command line to call your own C# command and have some build logic executed. I have written a small article about how to do this . There is also a cheat sheet showing the Unity API to use for specific tasks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM