Search Unity

UnityEditor.BuildTarget.iPhone' is obsolete: Use iOS

Discussion in 'Unity Cloud Build' started by josephsaade, Nov 4, 2016.

  1. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    Hello,

    I am trying to build on unity cloud using specifically Unity 5.4.0f3

    The build works fine on my machine, but on the cloud. it gives me the above error.

    The docs mention that it is Removed in version 5.4.1p3

    But I am using 5.4.0f3
     
  2. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    Additional note:
    The error appears as soon as the build start, I am not why unity continues the build and makes me wait 10-15 minutes before telling me it failed
     
  3. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    Managed to solve this with some #pragma's but now getting the weird shader compiler error on both iOS and Android.

    Here is the Error Log:
    Code (CSharp):
    1. [Unity] UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions, Boolean)
    2. 12607: [Unity] UnityEditor.CloudBuild.Builder:Build()
    3. 12608: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.08 seconds
    4. 12609: [Unity] Shader compiler: exception while compiling shader snippet. Thread=2108010496 Type=0 platform=5. Source:
    5. 12610: [Unity] #line 26 ""
    6. 12611: [Unity] #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING
    7. 12612: [Unity] #endif
    8. 12613: [Unity] #include "HLSLSupport.cginc"
    9. 12614: [Unity] #include "UnityShaderVariables.cginc"
    10. 12615: [Unity] #line 26 ""
    11. 12616: [Unity] #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING
    12. 12617: [Unity] #endif
    13. 12618: [Unity]             #pragma vertex vert
    14. 12619: [Unity]             #pragma fragment frag
    15. 12620: [Unity]             #pragma target 2.0
    16. 12621: [Unity]             #pragma multi_compile _ PIXELSNAP_ON
    17. 12622: [Unity]             #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
    18. 12623: [Unity]             #include "UnityCG.cginc"
    19. 12624: [Unity]             struct appdata_t
    20. 12625: [Unity]             {
    21. 12626: [Unity]                 float4 vertex   : POSITION;
    22. 12627: [Unity]                 float4 color    : COLOR;
    23. 12628: [Unity]                 float2 texcoord : TEXCOORD0;
    24. 12629: [Unity]             };
    25. 12630: [Unity]             struct v2f
    26. 12631: [Unity]             {
    27. 12632: [Unity]                 float4 vertex   : SV_POSITION;
    28. 12633: [Unity]                 fixed4 color    : COLOR;
    29. 12634: [Unity]                 float2 texcoord  : TEXCOORD0;
    30. 12635: [Unity]             };
    31. 12636: [Unity]             fixed4 _Color;
    32. 12637: [Unity]             v2f vert(appdata_t IN)
    33. 12638: [Unity]             {
    34. 12639: [Unity]                 v2f OUT;
    35. 12640: [Unity]                 OUT.vertex = UnityObjectToClipPos(IN.vertex);
    36. 12641: [Unity]                 OUT.texcoord = IN.texcoord;
    37. 12642: [Unity]                 OUT.color = IN.color * _Color;
    38. 12643: [Unity]                 #ifdef PIXELSNAP_ON
    39. 12644: [Unity]                 OUT.vertex = UnityPixelSnap (OUT.vertex);
    40. 12645: [Unity]                 #endif
    41. 12646: [Unity]                 return OUT;
    42. 12647: [Unity]             }
    43. 12648: [Unity]             sampler2D _MainTex;
    44. 12649: [Unity]             sampler2D _AlphaTex;
    45. 12650: [Unity]             fixed4 SampleSpriteTexture (float2 uv)
    46. 12651: [Unity]             {
    47. 12652: [Unity]                 fixed4 color = tex2D (_MainTex, uv);
    48. 12653: [Unity] #if ETC1_EXTERNAL_ALPHA
    49. 12654: [Unity]                 // get the color from an external texture (usecase: Alpha support for ETC1 on android)
    50. 12655: [Unity]                 color.a = tex2D (_AlphaTex, uv).r;
    51. 12656: [Unity] #endif //ETC1_EXTERNAL_ALPHA
    52. 12657: [Unity]                 return color;
    53. 12658: [Unity]             }
    54. 12659: [Unity]             fixed4 frag(v2f IN) : SV_Target
    55. 12660: [Unity]             {
    56. 12661: [Unity]                 fixed4 c = SampleSpriteTexture (IN.texcoord) * IN.color;
    57. 12662: [Unity]                 c.rgb *= c.a;
    58. 12663: [Unity]                 return c;
    59. 12664: [Unity]             }
    60. 12665: [Unity] Shader compiler: internal error compiling shader snippet type=0 platform=5: Protocol error - failed to read correct magic number
    61. 12666: [Unity] UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions, Boolean)
    62. 12667: [Unity] UnityEditor.CloudBuild.Builder:Build()
    63. 12668: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.09 seconds
    64. 12669: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.09 seconds
    65. 12670: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.11 seconds
    66. 12671: [Unity] Shader compiler: UnityShaderCompiler compiler executable disappeared on thread 2108010496, restarting
    67. 12672: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.09 seconds
    68. 12673: [Unity] Compiled shader 'Sprites/Default' (total internal programs: 24, unique: 8) in 3.30s
    69. 12674: [Unity] Shader error in 'Sprites/Default': Internal error communicating with the shader compiler process
    70. 12675: [Unity] (Filename: Sprites-Default Line: -1)
     
unityunity