Search Unity

I Need a Non-Stretched Splash Screen

Discussion in 'Editor & General Support' started by JayJennings, Aug 21, 2016.

  1. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    I'm using the free version of Unity and after the MWU splash screen, I need to have another one. I added a new scene and threw in the image and a script that showed it for 3 seconds and then moved to the main menu.

    The problem is that when I run the game on a widescreen monitor, the custom splash screen is stretched (Okay, the whole game is stretched, but I only really care about the splash screen.)

    I tried putting the picture in as a UI image and set Preserve Aspect, but that didn't seem to make any difference.

    What do I need to do to show a picture that's not stretched on a 1024x768 screen and larger?

    Jay
     
  2. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    Still looking for a solution...

    I've tried tweaking the Canvas Scaler settings -- no help. Tried changing stuff in the Player Settings > Resolution and Aspect Ratios and nothing helps.

    I'm supposed to send my game to Big Fish Games but they don't want their splash screen distorted. I can write a whole game but can't figure out how to make an image NOT stretch? Kind of demoralizing...

    Jay

    PS - Do I need to determine the aspect ratio of the display it's on and (in code) change the display of the image?
     
  3. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    And now I'm willing to pay actual $$ for a solution to this. Anyone???

    Jay
     
  4. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Hello Jay

    Here is how I would approach this:
    1. Ensure the image is set to "Sprite" mode and is the desired aspect ratio.
    2. Add an image object to your canvas.
    3. Specify the 1024x768 sprite on your image.
    4. Ensure that "Preserve Aspect" is selected.
    5. Adjust the 'power flower' so that it is zero pixels wide but clamped to the top and bottom of the canvas.
    6. Resize image so that it touches top and bottom of canvas.
    7. Resize width of image so that it is really really wide.
    Demonstration: http://i.imgur.com/m8knsHv.gifv

    I hope that this helps with your problem.

    I have attached the project that I created in the demonstration video.
     

    Attached Files:

    JayJennings and Glaswyll like this.
  5. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    Thanks for the step-by-step -- it was almost what I'd already done, but not quite, so I tweaked things to match. But the problem is still there -- not in the editor, but in an actual build. In the editor I can make changes like you did in your video and the image stays correct. But here's a picture of the monitor when I run the game:



    That circle in the logo should be a circle, not an oval as shown here. After playing with your sample project I'm seeing that if I launch at 1024x768 I get stretched circles on both your project and mine, but if I launch at 1440x9whatever the circles are circles.

    I think I'm going to send it to them and see what they say -- I can't believe I'm the only person submitting to Big Fish using Unity who's seen this, so maybe they have a solution.

    Thank you for your time.

    Jay
     
  6. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    Could the monitor settings be trying to stretch fit 4:3 to 16:9 or something like that? What device is this running on?
     
  7. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    It's running on a 15" MacBook Pro (Retina) and the screen in the picture is a Dell E2414H 16:9 24" external monitor. The stretching happens on the laptop display, although it's not as noticeable because it's not "as widescreen" as the external monitor.

    Jay
     
  8. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    As boyerworks suggests; your monitor seems to be configured to stretch the image to fit the screen.

    I suspect that if you ran Dark Souls 3 at 1024x768 with your monitor in its current setup; you'd see it's logo image stretched as well :)

    Press the options button on your Dell monitor and adjust the settings so that it does not stretch the image to fit the screen. Different monitors have different names for this; but on the Dell I believe it is the "Aspect Ratio" option:

     
    Last edited: Sep 6, 2016
    JayJennings likes this.
  9. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    Ah, yes! When I set the Aspect Ratio of the monitor to 4:3 the splash screen looks perfect. Okay, so I guess/hope Big Fish takes that into account -- people have widescreen monitors that will distort their logo and it's not my fault. :)

    Thanks for your help -- I'll submit the game and see if they kick it back for that.

    Jay
     
    Glaswyll likes this.