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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Game starts during Unity personal splash screen

Discussion in 'iOS and tvOS' started by Kyynele, Mar 16, 2015.

  1. Kyynele

    Kyynele

    Joined:
    Mar 16, 2015
    Posts:
    1
    I just upgraded to Unity 5. Imported my game and built a new version for iPhone.

    There's a new splash screen. Or, well, the game starts with a blank screen, and then shows the new splash screen. That for some reason seems to stay on the screen for about 4-5 times longer than the previous splash screen. During this time, sounds from the game start to play. When the splash screen goes away, the whole intro of the game has already played.

    I spent the last hour frustratingly adjusting an extra pause before the intro to time it to start after the overtly long, unanimated unity splash screen. I had to build the project dozens of times and run the game on device to see when the game can actually start, when the splash screen has cleared. And now when I run it in the editor, I have to wait 4 full seconds before the game starts, because that's the delay needed for the splash screen on device.

    I haven't seen any mentions in known issues about this, this can't be working as intended, can it? Get pro, or good luck manually timing your game to start after the mandatory splash screen?
     
  2. DennG

    DennG

    Joined:
    Dec 5, 2013
    Posts:
    158
    bump...
    I'm facing the exact same issue.
    It was working on 4.6 perfectly.
     
  3. BaggieMike

    BaggieMike

    Joined:
    Aug 24, 2014
    Posts:
    1
    Hi folks!

    Just wondered if you managed to get any traction with solving this? I'm annoyingly experiencing the same thing! grrr

    Cheers
    Mike
     
  4. DennG

    DennG

    Joined:
    Dec 5, 2013
    Posts:
    158
    I'm also still looking for a solution to this problem...
     
  5. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    990
    Experiencing the same issue, thus bumping this
     
  6. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    This is a known issue. We are planning to add some kind of callback that fires after the splash screen is finished. The reason why we start we game loop during the splash screen is that some users may want to do some initialization tasks and splashscreen is perfect time for this.
     
  7. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    267
    Same problem here. Not critical in my case, but would be good to know if it's fixed at some point.
     
  8. Jonnytown

    Jonnytown

    Joined:
    Apr 17, 2013
    Posts:
    1
    Any updates on this?
     
  9. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    The work on fixing the issue has already started. We can't reliably say which release will contain the fix.
     
  10. ivane5

    ivane5

    Joined:
    Jan 19, 2013
    Posts:
    1
    Kinda funny but this is a working solution:
    1. put solid colored quad over screen;
    2. check if it becomes visible(read pixels from screen);
    3. when square becomes visible(pixel color read from screen matches quad color) start your game loop;

    note: read just one pixel for efficiency. ))

    here's code:

    using UnityEngine;
    using System.Collections;

    public class SplashScreenGoneDetector : MonoBehaviour {

    public delegate void SplashScreenHidden();
    public SplashScreenHidden onSplashScreenHidden;
    private bool splashScreenHidden = false;

    void Start () {
    tex = newTexture2D(1, 1, TextureFormat.RGB24, false);
    StartCoroutine(ReadPixelsFromScreen());
    }


    private Texture2D tex;

    IEnumerator ReadPixelsFromScreen() {
    yield return new WaitForEndOfFrame();
    int width = Screen.width;
    int height = Screen.height;

    tex.ReadPixels(newRect(width/2, 0, 1, 1), 0, 0);
    tex.Apply();
    var pixelColor = tex.GetPixel(0,0);


    if(pixelColor.r == 1.0F)
    {
    onSplashScreenHidden();
    }
    else
    {
    StartCoroutine( ReadPixelsFromScreen());
    }
    }
    }
     
    Last edited: Jul 24, 2015
  11. CanisLupus

    CanisLupus

    Joined:
    Jul 29, 2013
    Posts:
    427
    Any news on this? It has been a while.

    EDIT: OK, I see that Application.isShowingSplashScreen exists in 5.2 now. Too bad that we can't update to Unity 5.2 because our game broke in several ways. :(
     
    AM-Dev likes this.
  12. almo

    almo

    Joined:
    Jul 14, 2010
    Posts:
    83
    Yeah, 5.2 breaks my game as well: iOS rendering is really slow. 5.3 breaks my game, Texts render a notch too high. 5.4 sposed to fix THAT, but my game is done and I want to ship. Really guys, come on. I know building an engine is really, really hard work. But both 5.2 and 5.3 making my game not work properly locks me out of updates for a long time, and now the Unity Personal Splash (which I totally don't mind) is playing while my corp logo is up.

    The time the unity splash is shown is different on all three of my iPhone 4, wife's iPad Mini and iPhone 6. So I can't even time it to show my logo at a good time.
     
  13. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    990
    Application.isShowingSplashScreen and chain your logo when that becomes false?
     
    theANMATOR2b likes this.
  14. almo

    almo

    Joined:
    Jul 14, 2010
    Posts:
    83
    isShowingSplashScreen doesn't exist in 5.1, which is what I have to use because of the problems cited in my post you quoted.
     
  15. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    990
    And I'm assuming you've tried the solution 2 posts above yours and it didn't work either?