Search Unity

UNITY_EDITOR and iOS Cloud Build

Discussion in 'Unity Build Automation' started by Bailywick, Aug 13, 2015.

  1. Bailywick

    Bailywick

    Joined:
    Mar 11, 2015
    Posts:
    17
    I ran into a few issues with my project when building that code in blocks with
    Code (CSharp):
    1. #IF UNITY_EDITOR
    I've got some plugins that use this flag and the code gets compiled by UCB when doing an iOS only build. I ended up removing is from some blocks which fixed my compilation errors.

    I changed the code so that:
    Code (CSharp):
    1. #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
    Becomes:
    Code (CSharp):
    1. #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
    Certainly this isn't needed when I locally build for iOS. My understanding is that the flag should only be defined when building to be run in the unity editor so I'm not sure why it would be defined in my UCB.
     
  2. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    There is a thread about the explanation here. It looks it is related, so please have a look and let us know if it solves your issue! :)
     
  3. Bailywick

    Bailywick

    Joined:
    Mar 11, 2015
    Posts:
    17
    I can give that a try, but it seems like a work around (similar to what I've done so far) for what appears to be a UCB bug?

    Ideally because most of the code using this are plugins I'd rather not change them in case I start getting into licensing issues. I have modified them for testing purposes but I'd rather not do that in a release. I'd also rather not start editing coding that I don't own (I'll have to remember to repeat the changes whenever I update the plugin).

    I guess I could file a bug report to the plugin creator to get the changes officially made but this looks to me like a UCB bug.
     
  4. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    Yes, maybe you can send in a bug report with a small reproducible, with one of the plugins you have the problems with , so we can have a look.