Search Unity

windows 10 - splash screen

Discussion in 'Windows' started by wouter_vugt, Aug 28, 2016.

  1. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    129
    Hi,

    I am using all the splash screen sizes available in unity, however when launching the app on my windows 10 mobile, the splash screen get very blurry. The splash screen starts to small, then after a second it blows up, but is blurry stretchy (like it was a too small size that is blown up to fit).

    How can this be?
     
    adrianokerber likes this.
  2. adrianokerber

    adrianokerber

    Joined:
    Oct 21, 2016
    Posts:
    3
    I have a similar problem, my splash image is in the correct size requested by Unity and what happens is that the image starts with the correct size, then is zoomed. I need to know if there is a documentation about what area of the splash image can be filled by my logo to doesn't get cropped by the screen.
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    Can you provide a screenshot of this? Or even better - a screencast?
     
  4. adrianokerber

    adrianokerber

    Joined:
    Oct 21, 2016
    Posts:
    3
    I found a similar question on another forum (Link). The wide image of the splash screen seems to be used on the Windows 10 Phone device. What happens is that the splash image starts fitting by width and then is changed to fit in height, which cause the cropping of the image.

    To test if the problems happens only with Unity build project, I have created a UWP blank project directly on Visual Studio and the crop problem does not occured. It seems that Unity adds a step that cause this issue.
     
    Last edited: Jan 6, 2017
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    Check the code in MainPage.xaml.cs, you should find extended splash adjustment there.
     
  6. adrianokerber

    adrianokerber

    Joined:
    Oct 21, 2016
    Posts:
    3
    I took me some time to figure out that it is an error generated by Unity. As @Aurimas-Cernius suggested I looked on MainPage.xaml, and figure out a fix to the problem. My solution was to get the width of the parent element and set that as the maximum width of the image element. The code is:
    Code (XAML):
    1. <SwapChainPanel x:Name="DXSwapChainPanel">
    2.     <Grid x:Name="ExtendedSplashGrid" Background="#000000">
    3.         <Image x:Name="ExtendedSplashImage" Source="Assets/SplashScreen.png" HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="{Binding ActualWidth, ElementName=ExtendedSplashGrid}"/>
    4.     </Grid>
    5. </SwapChainPanel>
    The short answer to the solution is:
    Code (XAML):
    1. MaxWidth="{Binding ActualWidth, ElementName=ExtendedSplashGrid}"