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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

[Beginner] GUI Surrounding the 3D Scene

Discussion in 'UGUI & TextMesh Pro' started by seiesos, Oct 27, 2018.

  1. seiesos

    seiesos

    Joined:
    Dec 14, 2016
    Posts:
    3
    I am making a first person dungeon crawler similar to Dungeon Master, Wizardry or Legend of Grimrock.
    I want to resize the 3D view to about 3/4 of the screen and then have the GUI on the bottom and the right side.
    Kind of like this (sorry for the awful drawing):



    How would I go about this? Thank you in advance!

    seiesos

    ***UPDATE***:

    I have resized the view port of my player camera, that's working well.
    My problem is, that when I create a UI Panel, the position of it in the Game View is completely different to the position of it in Play Mode, and different again when I actually run the game.
    How do I get the right sizing and positioning so that it fits exactly the area outside of the camera view port? My screen resolution is 1600x900.

    Canvas settings:


    Play Mode:


    Running the build:
     
    Last edited: Oct 28, 2018
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Your aspect ratio is changing when the window size does.

    To fix your Game-view aspect ratio:
    - Click "Free Aspect" at the top of the window, add a new setting with your 1600x900 resolution

    To fix in your build:
    - Go to your player settings. Under "Resolution and Presentation" uncheck "default is native resolution" and set the default resolution to 1600x900
    - Also in your player settings under "Resolution and Presentation", find "supported aspect ratios" and disable all of them except 16:9

    If you would like your UI to resize automatically how you want it to when the aspect ratio changes, you should look up some UI tutorials. It's fairly complicated, but you can achieve fantastic results. This tutorial goes into complex UI scaling around the 5 minute mark. https://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform?playlist=17111
     
    seiesos likes this.
  3. seiesos

    seiesos

    Joined:
    Dec 14, 2016
    Posts:
    3
    Thank you!