Skip to content

Instantly share code, notes, and snippets.

@seiji
Last active September 30, 2015 06:08
Show Gist options
  • Save seiji/1735284 to your computer and use it in GitHub Desktop.
Save seiji/1735284 to your computer and use it in GitHub Desktop.
build for ios using unity editor
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-batchmode \
-quit \
-projectPath $PROJECT_PATH \
-executeMethod CommandBuild.BuildiOS
// Assets/Editor/CommandBuild.cs
using UnityEngine;
using UnityEditor;
public class CommandBuild
{
public static void BuildiOS
{
BuildOptions opt = BuildOptions.SymlinkLibraries| BuildOptions.Development|BuildOptions.ConnectWithProfiler|BuildOptions.AllowDebugging;
BuildPipeline.BuildPlayer({"Assets/Scenes/Main.unity"},"iOS",BuildTarget.iPhone,opt);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment