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. Dismiss Notice

Unity weird game window padding

Discussion in 'Editor & General Support' started by CyberKn1ght, Dec 5, 2019.

  1. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    This is probably really easy to disable but I couldn't find anything on the internet
     

    Attached Files:

  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'd check camera viewport settings, and check the anchors of your background to verify it is set to expand with the viewport size instead of just staying the same size in the middle of the viewport.
     
  3. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    I am pretty new, so I don't know a lot about unity yet, but I'll send some screenshots (it is from another scene but it has the same problem and I made it the same way)
     

    Attached Files:

  4. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,315
    Have you tried wiggling the scale slider?
     
  5. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    If you mean the one in the game menu, yes, but the game should look natural at 1x, plus it pixelizes all the art
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I haven't messed with orthographic cameras much, but I'd see if the "size" parameter does anything for you.

    Also your canvas render mode is set to world space, which places it as an object in the game world like any other object, which means its placement in relation to the camera matters. You might use a world space canvas if you had a 3D FPS game and you wanted your character to interact with a touch screen computer on a desk in the game world, as an example.

    Try using one of the Screen Space modes instead of World Space and see if that works better for what you're trying to do.

    Lastly, your background is set to anchor in the center. If you moved the anchors to all 4 corners it will stretch or shrink with the position of those anchors instead of staying the same size but just centered. I also haven't messed with the canvas scalar component, but I know it could be part of the problem. You could try disabling it to see if it has something to do with it.

    https://docs.unity3d.com/Manual/class-Camera.html
    https://docs.unity3d.com/Manual/UICanvas.html
    https://docs.unity3d.com/Manual/UIBasicLayout.html
     
    Last edited: Dec 6, 2019
  7. EggyAndBacon

    EggyAndBacon

    Joined:
    Sep 13, 2018
    Posts:
    6
    It has nothing to do with the camera component. You need to change a setting inside the Game window. Disable "low resolution aspect ratios", and it should solve the problem. :)

    upload_2019-12-7_15-57-35.png
     
  8. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    Infinitely thanks Eggy, what an easy solution