Unity Community

Register or Sign In:

+ Reply to Thread
Results 1 to 2 of 2

  1. Location
    San Diego, CA
    Posts
    43

    Conditionally Dynamic Device Specific Build Process

    On my second cup of coffee here and hope I make sense with my questions here.

    After watching the fantastic Smuggle Truck design/build discussions here:
    http://learnunity3d.com/2011/04/smug...chniques-talk/
    I was perplexed by how they created the iPad/iPhone/Mac OS conditional compilation build all from a single project. Only those assets referenced for that build are baked into the final project that is then sent to XCode.

    I'm aware of the preprocessor flags (http://unity3d.com/support/documenta...mpilation.html). I also understand how to use them.

    I guess the hurdle(s) I haven't figured out yet are the following.

    1. How does one condition the build between UNITY_IPHONE and UNITY_IPAD? Note: there isn't any UNITY_IPAD define that I'm aware of. Within the Unity editor it is not possible to pass in custom preprocessor defines globally. They are scoped per-script. I see the command line option of "-executeMethod …" (http://unity3d.com/support/documenta...Arguments.html) Perhaps that is the magic sauce?

    2. How did they conditionally include only unique assets to that particular build? For example, Mac OS X textures would be a higher resolution than those for the iPad and iPhone. Perhaps, this will be answered in question one.

    Anyone have any ideas or other forum links that I may have missed?
    Note, I have seen this: http://forum.unity3d.com/threads/171...al+Compilation


  2. Location
    San Diego, CA
    Posts
    43
    I created a by scene (less than ideal) example on this here:
    http://www.chrisdanielson.com/2011/0...ion-by-scenes/

    I'm going to come up with a more elegant solution and will post a solution using the AssetBundle concept soon. For now, just wanted to show how I got things working initially.
    Last edited by danielsonchris; 04-29-2011 at 12:56 PM. Reason: grammar