GameView Sizes in Unity

 ·   ·  ☕ 2 min read
🏷️
This page looks best with JavaScript enabled
The Unity Game view toolbar has a dropdown that allows you to select various resolutions and aspect ratios presets for testing how your game will look on different monitors. While custom presets may be added to that dropdown menu by clicking the button at the bottom, there's no obvious way of removing items from the list once they're added.
gameview aspect ratio and screen size menu

Fortunately, there’s a configuration file that contains all custom menu entries, and it’s a standard Unity YAML data file that can be modified in any plain text editor. The file is called GameViewSizes.asset, and it’s located under your user profile.

%AppData%\Unity\Editor-5.x\Preferences\GameViewSizes.asset
~/Library/Preferences/Unity/Editor-5.x/GameViewSizes.asset

The configuration file is shared by all Unity installations and projects on your computer, so any changes you make to it inside Unity or using a text editor will be accessible the next time you open any Unity project on that computer.

The contents of my file are shown below, however the contents of your file will likely differ.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
  m_ObjectHideFlags: 61
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 12330, guid: 0000000000000000e000000000000000, type: 0}
  m_Name: 
  m_EditorClassIdentifier: 
  m_Standalone:
    m_Custom:
    - m_BaseText: "1.25:1"
      m_SizeType: 0
      m_Width: 5
      m_Height: 4
    - m_BaseText: "1.33:1"
      m_SizeType: 0
      m_Width: 4
      m_Height: 3
    - m_BaseText: "1.50:1"
      m_SizeType: 0
      m_Width: 3
      m_Height: 2
    - m_BaseText: "1.60:1"
      m_SizeType: 0
      m_Width: 16
      m_Height: 10
    - m_BaseText: "1.78:1"
      m_SizeType: 0
      m_Width: 16
      m_Height: 9
    - m_BaseText: "2.33:1"
      m_SizeType: 0
      m_Width: 21
      m_Height: 9
    - m_BaseText: "3.56:1"
      m_SizeType: 0
      m_Width: 32
      m_Height: 9
    - m_BaseText: 
      m_SizeType: 1
      m_Width: 1920
      m_Height: 1200
  m_iOS:
    m_Custom: []
  m_Android:
    m_Custom: []
  m_HMD:
    m_Custom: []

Each menu entry consists of four properties:

PropertyDescription
m_BaseTextAn optional text label
m_SizeType
0 Aspect Ratio (widthheight)
1 Fixed Resolution (width × height)
m_WidthThe horizontal dimension
m_HeightThe vertical dimension

To remove an entry, delete the lines associated with that property group, for example, I could remove the “1.50:1” (or 3:2) entry by deleting the following lines from the file:

25
26
27
28
- m_BaseText: "1.50:1"
m_SizeType: 0
m_Width: 3
m_Height: 2
now you know
Now you know... and knowing is half the battle!
End of Line.