Skip to content

Instantly share code, notes, and snippets.

@MattRix
Created April 28, 2014 17:55
Show Gist options
  • Save MattRix/11379277 to your computer and use it in GitHub Desktop.
Save MattRix/11379277 to your computer and use it in GitHub Desktop.
Unity menu item to do iOS builds easily (make sure you put it in a folder named "Editor")
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System;
public class DZMenu
{
[MenuItem ("DiscoZoo/Build for iOS")]
static void BuildForIOS()
{
BuildOptions options = BuildOptions.None;
options |= BuildOptions.AcceptExternalModificationsToPlayer;
options |= BuildOptions.SymlinkLibraries;
UnityEditor.BuildPipeline.BuildPlayer(new string[] {"Assets/Zoo.unity"},"Export/iOS",BuildTarget.iPhone,options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment