Search Unity

Windows Desktop 64-bit being built on a Mac editor

Discussion in 'Unity Build Automation' started by cshankland_unity, Feb 22, 2019.

  1. cshankland_unity

    cshankland_unity

    Joined:
    Mar 10, 2018
    Posts:
    5
    Hello,

    I have a Windows Desktop 64-bit build configured on my cloud dash. It is failing to build because of the following collection of defines (from the log):

    4847: [Unity] /define:UNITY_STANDALONE_WIN
    4872: [Unity] /define:UNITY_EDITOR
    4874: [Unity] /define:UNITY_EDITOR_OSX

    It is not clear to me why any editor defines are enabled and in particular why OSX is defined for a windows desktop build. I will also note that based on the path to unity in the log, the executor is a mac which is another confusing tidbit.

    Maybe I've just missed some config option?

    Cheers
     
  2. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    These defines are standard and are present in all Unity builds, allowing you to customize code dependent on target and execution environment - see the documentation for platform-dependent compilation.

    At the moment all UCB execution takes place on OSX builders. We are currently working on adding Windows/Linux execution environments however and hope to make these available to customers for beta testing soon.
     
  3. cshankland_unity

    cshankland_unity

    Joined:
    Mar 10, 2018
    Posts:
    5
    When I build from the editor on a windows machine I do not have any UNITY_EDITOR* definitions, so I'm not sure what you mean by "these defines are present in all Unity builds"

    For example (on my windows machine):
    Code (CSharp):
    1.  
    2. #if !UNITY_EDITOR
    3. error;
    4. #endif
    5.  
    6. #if !UNITY_EDITOR_WIN
    7. error;
    8. #endif
    9.  
    This will fail to compile during a build - as expected - and seems to imply that neither UNITY_EDITOR nor UNITY_EDITOR_WIN are in fact defined during that build. My expectation is that when doing a UCB run that the definitions would be the same, but according to the build log that is not the case.
     
    Last edited: Feb 22, 2019
  4. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    Ah right, sorry I misread your initial question. Yes, that's a bit strange that the
    UNITY_EDITOR
    defines are there during the build. If you submit a support ticket we can look deeper into why exactly this is happening.