Search Unity

Size of camera in scene is different from runtime

Discussion in 'Getting Started' started by MGodoy-BR, May 16, 2019.

  1. MGodoy-BR

    MGodoy-BR

    Joined:
    Mar 17, 2019
    Posts:
    8
    Hi, folks!

    I added a camera to a scene and set the projection to Orthographic and size to 55.

    In game display and set Standalone (1024x768) and Scale 0,285 and everything looks good.

    In Player Settings, I turned into fullscreen mode to Fullscreen Window, Default Screen Width 1024 and Default Screen Height to 768. However, when I build the game and run it, the screens sizes is ignored.

    I'd like to have the scene shown like a letter box, like https://docs.unity3d.com/Manual/class-PlayerSettingsStandalone.html#Resolution said, obeying what game display shows me in design time. Does anyone know how can I get this?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You can create the letter box effect using the post processing stack, or output the camera to a texture which you can manipulate using UI controls, like anchors, so it is the correct proportions regardless of the current game window dimentions. As for the default screen size, that is just the default. If you previously ran the build the res settings are saved to the registry and used the next time you launch your build instead of the default.
     
    MGodoy-BR likes this.