Search Unity

I broke the Unity splashscreen. Sorry?

Discussion in 'iOS and tvOS' started by Shushustorm, Sep 7, 2015.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hello everyone!
    I just tried to do some optimizations on an app that I'm working on and after doing so, the Unity splashscreen is gone, sort of. When I build for iOS, there is still a blueish dark grey background showing up. The color looks like this is the background of the Unity 5's splashscreen. But the Unity icon is missing. After a few seconds, the plain color will go away and my splashscreen will appear.
    Has anybody had a similar problem at some point?
    I guess I'm not allowed to release builds like that, right? I'm actually trying to finish that app as soon as possible and get it approved by Apple. I don't have Unity iOS Pro, though.
    Also, I don't really know if this is an iOS-specific problem or not, so I posted it here.

    Oh, and just to make sure: I even checked
    Player settings -> Splash image -> Show Unity Splash Screen
    and it didn't work either. This was turned off before by default and Unity always included it. Well, until now.

    EDIT:
    Some more information here about the optimizations I made: Nothing fancy, I just noticed Unity is actually loading assets while displaying its splash screen. So I moved my splashscreen into the titlescreen so that it doesn't switch scenes in between, which saves loading time.

    EDIT2:
    Here's a screenshot, too:
    screenshot.PNG

    Many thanks in advance for any help!
    Greetings,
    Shu
     
    Last edited: Sep 8, 2015
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Last edited: Sep 8, 2015
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Sure thing. Will do ASAP. Thanks for the reply.

    @karl.jones Alright, I just tried to size down the project to the relevant part, but then it will work. I will send in when I can reproduce this.
     
    Last edited: Sep 8, 2015
    karl_jones likes this.
  4. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    @karl.jones I'm uploading the report right now. While reducing the project to the affected parts of the game, I found out about some things that might speed up resolving this. More details are included in the report.
     
    karl_jones likes this.
  5. foobraco

    foobraco

    Joined:
    Oct 20, 2012
    Posts:
    12
    Hi @Shushustorm @karl.jones , did you manage to fix it? The same thing happened to me and I've tried everything to fix with no results, I'm on unity 5.2.1p1.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Have you tried 5.2.1p4?
     
    Shushustorm likes this.
  7. foobraco

    foobraco

    Joined:
    Oct 20, 2012
    Posts:
    12
    Thanks for the answer @karl.jones , I've been checking the patch releases but didn't find the fix on the release notes so we haven't make the update and stick with 5.2.1p1 for now, but I'll download it later today to see if that patch fixes the bug, thank you!
     
  8. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I'd be curious if that does fix it... i'm seeing the same behavior, and sometimes.. the logo will 'flash' for just may .25 seconds (if that even) before the game shows its' first frame.
     
  9. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Could you please file a bug report, upload a project there and post the bug number? I'd be glad to look into this problem.
     
  10. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I actually uploaded a bug report on Sep 8, 2015:
    I don't know about the bug number, though.
    Unfortunately, I cannot confirm that the problem has been solved in a newer version, because I used a workaround to get rid of the problem. But it should be fixed. When I have the time, I will take a look into this and try to undo the workaround and test on 5.2.2.. If I do so, I will keep you informed.

    Also:
    @foobraco
    @tswalk
    The workaround is pretty simple (maybe it works for you, too?): Put all of your code included in Start() on hold for a frame:
    Code (CSharp):
    1. void Start () {StartCoroutine(Start_());}
    2. IEnumerator Start_ () {
    3. yield return null;
    4. // your start code here
    5. }
    or maybe even:
    Code (CSharp):
    1. IEnumerator Start () {
    2. yield return null;
    3. // your start code here
    4. }
     
  11. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I just tried to undo the workaround, but the problem wouldn't show up anymore.
    So I thought the update fixed it, but after running the project in 5.0, the problem wouldn't show up either.
    I guess it's either a specific problem of a certain patch release that I used or the problem has been solved permanently after making it compatible to open in 5.2.x.
     
    karl_jones likes this.
  12. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    It's possible that in your case iOS has cached old, incorrect launch images. Certain actions, such as app deletion, invalidates the cache and forces the OS to regenerate the images.
     
    Shushustorm likes this.
  13. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    @karl.jones
    @povilas
    Alright, this is quite irritating. I am running into this again.
    I installed Unity 5.4B10. Now, when I run a 5.4B10 build, there will be a different Unity splash screen (a white one! Is it different because it's beta?), but it will only show up for a very short time just before the game starts. I guess it's not intended like that.
    Then I thought, I will be fine, because it's just a 5.4 beta bug and I still keep a 5.2.2 copy of my project and Unity 5.2.2. But now, after building in 5.2.2, the splash screen of 5.2.2 builds will be completely gone just like the first time this issue appeared.
    Any ideas how to fix this?

    EDIT:
    New screenshot, because it looks different.
    There is a small black border on the bottom:
    screenshot.png
     
    Last edited: Mar 16, 2016
  14. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    The device caches the previous splash screen in some cases. You need to completely remove the app and reset the device to clear the cache. To verify that it's caching issue, try to build with different bundle id.
     
    Shushustorm likes this.
  15. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I tried deleting the app, reboot the device and use a differnt bundle ID, but unfortunately the issue remains the same.

    EDIT:
    I also cleared the following folders, which didn't solve the problem:
    HD/User/Me/Library/Developer/Xcode/DerivedData
    HD/User/Me/Library/Developer/Xcode/iOS DeviceSupport
    HD/private/var/[...]/com.apple.DeveloperTools
     
    Last edited: Mar 22, 2016
  16. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Case number for this issue: 725746

    Also, maybe this is useful: I am getting the following warning when building:

    Splash screen images not provided: Mobile Splash Screen*, iPhone 3.5''/Retina, iPhone 4''/Retina, iPhone 4.7''/Retina, iPhone 5.5''/Retina, iPad Portrait, iPad Portrait/Retina
    UnityEditor.HostView:OnGUI()
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Thanks i'll try and take a look. Sadly its ios so not something I can check right away.