Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Mobile [5.4B10] iOS and general - 7 problems (3 solved)

Discussion in '5.4 Beta' started by Shushustorm, Mar 15, 2016.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    Hello everyone!
    When building for iOS, i notice two things:
    - The build size is about twice as big as the Unity 5.2.2 version.
    - Building the project takes much longer than it takes using Unity 5.2.2.

    Also, there is an error showing up when trying to run it on a device via Xcode:
    "
    ld: '[path to build]/Libraries/Plugins/IOS/libOneSignal.a(OneSignal.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    "
    OneSignal.o is a script from the asset store. So I don't really know what's going on there. But it never caused any problems with 5.2.2.

    Any ideas?
    Greetings,
    Shu

    EDIT:
    Alright, I fixed the bitcode issue:
    Project -> Build settings -> All -> Build options -> Enable Bitcode -> No
    Is this bad? I don't know if bitcode should be enabled and this is just a bad workaround.

    Also, now that it's running:
    There are still major performance hiccups just like the ones introduced with 5.3.

    EDIT2:
    I just wanted to compare the profiler to 5.2.2, but if I try to run the game in the editor, the editor will crash. Tested that multiple times. There are no errors or anything. Just a plain crash.
    Just some more information on this: I cloned a project completely for testing with 5.4 beta. And this exact project is running 100% fine in Unity 5.2.2.

    Those problems show up using Unity 5.4.0B10 and Xcode 7.1.1.
     
    Last edited: Mar 15, 2016
    MrEsquire likes this.
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think Bitcode is enabled by default on the new versions of Unity, there is a check box in xcode to disable it.
    I assume your app dont use it.. so its safe
     
    Shushustorm likes this.
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    Thanks for your reply! Unfortunately, it's still unusable, though, because of editor crashes and still even worse performance on iPhone 5S than I get on iPhone 4S when using 5.2.2. (low framerate like on 4S, but additionally every few seconds there is lag)
    I didn't test the 5.4 build on 4S, but I assume it's going to be about 10 FPS.
     
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Ah okay, have you test the latest 5.3.4 to compare, its not surprise we all have to install a few versions of Unity to get things working correctly :-(
     
  5. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    I'm not sure, but I guess 5.3.3 was the latest version that I tested and the performance problems were still the same. So I doubt 5.3.4 will have changed something. Actually, I'd need 5.3.x for IAPs and 5.4.x because of IAP testing. Would have been glad to use Unity IAP, but I guess there's no way of doing so. I just have to stick with 5.2.2. But I will try 5.3.4 anyway, just to make sure those problems here are 5.4-related.

    EDIT:
    Alright, I just tested 5.3.4 and those are the results:

    same as in 5.4:
    - build size twice as big as 5.2.2, too
    - bitcode issue present, too

    better than in 5.4:
    - did not take as long to build as 5.4
    - performance slightly better than 5.4, not as many hiccups, but still unusable (on 5.2.2 no hiccups at all)
    - editor will not crash when running the game

    worse than in 5.4: (actually, this is the same in 5.4) - EventTrigger PointerDown/PointerUp not working properly (PointerUp seems to call PointerDown as well)

    EDIT2:
    I just noticed <OpenGL 4.1> in the editor title, even though there is no OpenGL 4.1 in the Player Settings's "Graphics APIs". Changing the order of the given APIs (Metal, OpenGLES2 and OpenGLES3 (when activated manually)) will not result in different performance.

    EDIT3:
    Alright, awesome news:
    In 5.4B10, the hiccups are gone when I close Xcode and relaunch the app without it being linked to Xcode. Concerning overall performance, I will have to take a further look with an in-game FPS counter or test on 4S.
    It still says "<OpenGL 4.1>", however.

    EDIT4:
    There is another problem now: The Unity splash screen is gone. In 5.4B10, a white splash screen (different for builds with beta versions?) will show for a very short time just before the game starts. Now, the old issue that I faced back a few months ago, reappears: The splash screen is gone, even in 5.2.2.

    Thread for this issue is here:
    http://forum.unity3d.com/threads/i-broke-the-unity-splashscreen-sorry.353374/#post-2343703

    EDIT5:
    Another issue:
    Not only will the editor crash when I try to start the game there, but also when navigating in the scene view.
    I'm deinstalling 5.4B10 now, though. It's just not working.
    Maybe 5.3.4 builds will work without being linked to Xcode. But that's a different topic.
     
    Last edited: Mar 16, 2016
    MrEsquire likes this.
  6. CarlosRincon

    CarlosRincon

    Unity Technologies

    Joined:
    Jan 28, 2016
    Posts:
    124
    Hi, would appreciate bug reports as appropriate.
     
  7. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    Alright, I reported all of them.
    If somebody figures out the problem with OpenGL ES 2.0 on iPhone 4S, feedback would be nice.
     
    MrEsquire likes this.
  8. Alex-Lian

    Alex-Lian

    Guest

    Could you list the bug numbers here so we can inspect specifically?
     
  9. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    @Alex Lian
    Here you go:
    (Case 781621) iOS build size doubled*
    (Case 781624) iOS Bitcode enabled = Yes?
    (Case 781627) iOS - App not running on iPhone 4S
    (Case 781630) Unity 5.4.0B10 Editor crashes


    *(includes the problem with slow builds)
    However, I didn't report the missing splash screen (again), because it's pretty much the same issue I have reported a few months back. So if the report is still there, you can flag it as unsolved? Case number for that issue is here:
    (Case 725746) I broke the Unity splashscreen (iOS
     
  10. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    These two were discussed on http://forum.unity3d.com/threads/unity-5-3-x-build-size-increase-faq.383533
    . Basically Bitcode will be added and submitted alongside with your app. Though it will be stripped by Apple servers when end users will be downloading your app from App Store.

    I passed 781627 and 725746 to our QA, though they might need your project to reproduce 781627 issue.
     
  11. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    @Mantas Puida
    Thanks for the link! QA already forwarded this to me as well, but the thing is: Build size doesn’t increase by 130-150MB as mentioned there. It actually increases by almost 500MB on an empty project (694,6MB in Unity 5.2.2 and 1,16GB in Unity 5.3.4).

    For 781630, I am downloading B11 right now and I will try again.
    For 781627, I update Shader Forge and I will try again, because as it seems to be a graphics problem, this might be connected to Shader Forge being outdated.

    EDIT:
    Alright, B11 didn't solve 781630, but I tried a different project and it works there. Maybe I can figure out what causes the problem.

    EDIT2:
    Same with 781627: Different project works fine. Solid 30FPS at 19% CPU usage. Will try to figure out what's the difference.


    EDIT3:
    While I have no idea whether or not this has something to do with the issue (781627), when building the project that doesn't work on 4S (using 5.3.4 or 5.4.0), the following message will show up:
    screenshot.PNG
    I always click "Skip bundle".

    EDIT4:
    Updated Shader Forge now and all of the Shader Forge shaders. However, 781627 and 725746 persist.

    EDIT5:
    Somewhat solved: 781630's crashes were related to Shader Forge shaders. I updated Shader Forge and the shaders from 1.18 to 1.25 and the editor doesn't crash anymore. However, when navigating in the scene view, there is lag.
    Here are screenshots of the profiler that shows the effect of navigating:
    screenshot profiler.PNG
    screenshot profiler 2.PNG

    EDIT6:
    781630 persists. I was just getting lucky with sporadic non-failure. So it's not a Shader Forge issue.

    EDIT7:
    781627:
    Just in case this might be helpful:
    This is what Xcode tells me after trying to run the build on iPhone 4S:

    2016-03-22 19:30:06.231 onelife[11696:60b] -> registered mono modules 0xbe7c30
    2016-03-22 19:30:06.310 onelife[11696:60b] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
    -> applicationDidFinishLaunching()
    -> applicationDidBecomeActive()
    Renderer: PowerVR SGX 543
    Vendor: Imagination Technologies
    Version: OpenGL ES 2.0 IMGSGX543-97.7
    GLES: 2
    GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_IMG_read_format GL_IMG_texture_compression_pvrtc
    OPENGL LOG: Creating OpenGL ES 2.0 graphics device
    Initialize engine version: 5.3.4f1 (fdbb5133b820)

    When the last line shows up, it takes about 30 seconds until Xcode tells me the application quit due to memory pressure.
     
    Last edited: Mar 22, 2016
    MrEsquire likes this.
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,263
    @Shushustorm
    I always click "Skip bundle".

    Why don't you load the bundle?
    I always click load bundle.
     
  13. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
  14. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I do the same, never had issues, but to be honest I dont know what it means, always thought it was something needed related to Unity
     
  15. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    292
    Most like it's a plugin needed to control XCode from Unity, no reason to not load it.
     
  16. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I posted my analysis of Unity iOS distribution and installation sizes: I did analysis of recent iOS empty app installation and distribution sizes, might be useful: http://forum.unity3d.com/threads/unity-5-3-x-build-size-increase-faq.383533/#post-2568795
    and yes, you should be loading Xcode plugin, as otherwise Build & Run won't work. This pop-up usually reappears when you switch between Unity versions, because Unity will reinstall different version of plugin.
     
    Shushustorm and mh114 like this.
  17. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
  18. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Whats the latest with your issues out of curiosity?
     
  19. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    @MrEsquire
    I don't use anything newer than 5.2.2 anymore since I just can't keep going with any version above that, but here are the latest results that I had:

    (Case 781621) iOS build size doubled*
    unresolved

    (Case 781630) Unity 5.4.0B10 Editor crashes*
    unresolved

    (Case 782331) Bad shadow quality (low texture resolution*
    unresolved

    Performance hiccups*
    unresolved, but only appearing when linked to Xcode

    (Case 781624) iOS Bitcode enabled = Yes?*
    solved (I should probably have updated an addon, but for a short-term solution setting "Bitcode" to "No" worked just fine)

    (Case 781627) iOS - App not running on iPhone 4S**
    solved

    (Case 725746) I broke the Unity splashscreen (iOS**
    solved

    *not appearing in 5.2.2
    **not specifically 5.4.x or 5.3.x problems. Eventually, I had similar problems in 5.2.2.
    So basically, everything works in 5.2.2 now, but not in newer versions.
     
    Last edited: Apr 3, 2016
    MrEsquire likes this.
  20. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,528
    >>(Case 782331) Bad shadow quality (low texture resolution*
    >>unresolved
    well you say "the shadow quality will be very low, even on "fantastic" settings. <...> However, it doesn't happen when I start a whole new project." So stripped down project would help (as in you say it is enough to create scene with a cube).
    What i think is happening is that if you are in ios mode we will do shadows without cascades (even in editor) to match what happens device.
     
  21. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,027
    @Alexey
    I'm sorry, I cannot provide you with a stripped down project. This just takes too much time.
    But I don't think the problem comes from a simulation like that, because sometimes the resolution would turn high again for whatever reason (rarely and as far as I see completely sporadic) and the shadows of a 5.2.2 build are even magnitudes better on actual devices than the shadows I got in 5.3.x or 5.4.x in the editor.