Big Bad Robots is an indie game developer but we also do contract development. We have developed on all kinds of platforms (PC,Handheld,Consoles) but now primarily focus on iOS,Android and Unity. Contact us if you looking for developers with over 20 years experience in software and game development at biz -at- bigbadrobots.com

Helping along the Unity build pipeline for iOS and Android (Part 1)

December 30, 2012terence

One of the most common things to do when developing iOS or Android application is to interface with external plugins (i.e. facebook, gree,urban airship) that are not provide natively through Unity. The old method used to be sticking a  scripts in the “Assets\Editor” directory called either “PostprocessBuildPlayer” on iOS or adding a menu item for windows accessible via the editor. This method of madness is documented on Unity Build Player Pipeline page. However with the advent of  3.5.2, you can now write C# scripts to automate the process with having to write python/perl scripts. Documentation is lacking at this time but you can see an example here. Hopefully Unity will start documenting these features soon.

This blog is more of a reference (for me) to keep track of my efforts to research creating plug-ins for iOS and Android and streamline the build process out from Unity. Right now besides the two links describe above, I am also looking into efforts to add files, directories to an XCode project. My initial research starts with:

  • Mod PBXProj – Which is  a python script which allows you to modify the xcode project. While is still useful for research purposed with the advent being able to control the build using C# scripts this becomes less relevant. Still looking at the script allows an insight into how and what to manipulate to modify an xcode project to allow references to be added.
  • dcariola/XCodeEditor-for-Unity – This seems a lot more relevant but haven’t found out how usable is it. If you grab the source at the time this blog was posted, you will also need to grab a the MiniJSON.cs from here and not the darktable one that pops up when you do a MiniJSON search via google. Basically what this should do is similar to the Mod PBXProj allow you to add files and directories to the XCode project. Importantly, you can also import a ‘projmods’ JSON files which will allow you to specify sequence of commands to add specific files. I haven’t yet been able to track down what format this file takes and will post more when i find out.

My current path is to start with the XCodeEditor for Unity to see if it does anything useful yet and perhaps contribute to it. If anybody can point me to the format for the projmods JSON file and the format of the .pbxproj file that would really help.