├── .editorconfig ├── .gitignore ├── LICENSE ├── LICENSE.meta ├── NewResolutionDialogAssembly.asmdef ├── NewResolutionDialogAssembly.asmdef.meta ├── Prefabs.meta ├── Prefabs ├── NewResolutionDialog.prefab └── NewResolutionDialog.prefab.meta ├── README.md ├── README.md.meta ├── Scenes.meta ├── Scenes ├── NewResolutionDialog.unity ├── NewResolutionDialog.unity.meta ├── SampleScene.unity └── SampleScene.unity.meta ├── Scripts.meta ├── Scripts ├── Controller.meta ├── Controller │ ├── ButtonHandler.cs │ ├── ButtonHandler.cs.meta │ ├── CreateEventSystemIfNoneExists.cs │ ├── CreateEventSystemIfNoneExists.cs.meta │ ├── FpsLabel.cs │ ├── FpsLabel.cs.meta │ ├── GraphicSettingsHandler.cs │ ├── GraphicSettingsHandler.cs.meta │ ├── PopupHandler.cs │ └── PopupHandler.cs.meta ├── DefaultInputsHandler.cs ├── DefaultInputsHandler.cs.meta ├── Settings.cs └── Settings.cs.meta ├── Todos.md ├── Todos.md.meta ├── example.png ├── example.png.meta ├── package.json └── package.json.meta /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | indent_style = space 3 | indent_size = 4 4 | end_of_line = crlf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Steffen Itterheim 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a579022938ae894383107c420771550 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /NewResolutionDialogAssembly.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NewResolutionDialog", 3 | "references": [], 4 | "includePlatforms": [ 5 | "Editor", 6 | "LinuxStandalone64", 7 | "macOSStandalone", 8 | "WSA", 9 | "WindowsStandalone32", 10 | "WindowsStandalone64" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": false, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [], 18 | "versionDefines": [], 19 | "noEngineReferences": false 20 | } -------------------------------------------------------------------------------- /NewResolutionDialogAssembly.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8b5d02b5e819664f9a878d3f2b0e6a6 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c419c3bfef716ef4c84127906b440562 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/NewResolutionDialog.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9419655a6ab1b524a95d15e08ac510a6 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityResolutionDialog 2 | 3 | ![Example Image](https://github.com/sitterheim/UnityResolutionDialog/blob/develop/example.png) 4 | 5 | Replacement for Unity's built-in resolution dialog (aka Screen Selector) that was removed in Unity 2019.3. Works both up front (simply make it the first scene) and as a popup dialog (default key: ESC). Intended for development / testing purposes but can also be used in production. 6 | 7 | # Installation 8 | Add this dependency to your ``manifest.json`` located at ``/Packages/manifest.json``: 9 | ``` 10 | { 11 | ... 12 | "dependencies": { 13 | ... 14 | "com.sitterheim.unityresolutiondialog": "https://github.com/sitterheim/UnityResolutionDialog.git#release/stable" 15 | } 16 | ... 17 | } 18 | ``` -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdff1397c6308dd49a8715257caa5e2d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41afe49bd37107c4088be8612d0834ff 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scenes/NewResolutionDialog.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &46721837 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 46721840} 133 | - component: {fileID: 46721839} 134 | - component: {fileID: 46721838} 135 | m_Layer: 0 136 | m_Name: Main Camera 137 | m_TagString: MainCamera 138 | m_Icon: {fileID: 0} 139 | m_NavMeshLayer: 0 140 | m_StaticEditorFlags: 0 141 | m_IsActive: 1 142 | --- !u!81 &46721838 143 | AudioListener: 144 | m_ObjectHideFlags: 0 145 | m_CorrespondingSourceObject: {fileID: 0} 146 | m_PrefabInstance: {fileID: 0} 147 | m_PrefabAsset: {fileID: 0} 148 | m_GameObject: {fileID: 46721837} 149 | m_Enabled: 1 150 | --- !u!20 &46721839 151 | Camera: 152 | m_ObjectHideFlags: 0 153 | m_CorrespondingSourceObject: {fileID: 0} 154 | m_PrefabInstance: {fileID: 0} 155 | m_PrefabAsset: {fileID: 0} 156 | m_GameObject: {fileID: 46721837} 157 | m_Enabled: 1 158 | serializedVersion: 2 159 | m_ClearFlags: 2 160 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 161 | m_projectionMatrixMode: 1 162 | m_GateFitMode: 2 163 | m_FOVAxisMode: 0 164 | m_SensorSize: {x: 36, y: 24} 165 | m_LensShift: {x: 0, y: 0} 166 | m_FocalLength: 50 167 | m_NormalizedViewPortRect: 168 | serializedVersion: 2 169 | x: 0 170 | y: 0 171 | width: 1 172 | height: 1 173 | near clip plane: 0.3 174 | far clip plane: 1000 175 | field of view: 60 176 | orthographic: 0 177 | orthographic size: 5 178 | m_Depth: -1 179 | m_CullingMask: 180 | serializedVersion: 2 181 | m_Bits: 4294967295 182 | m_RenderingPath: -1 183 | m_TargetTexture: {fileID: 0} 184 | m_TargetDisplay: 0 185 | m_TargetEye: 3 186 | m_HDR: 1 187 | m_AllowMSAA: 1 188 | m_AllowDynamicResolution: 0 189 | m_ForceIntoRT: 0 190 | m_OcclusionCulling: 1 191 | m_StereoConvergence: 10 192 | m_StereoSeparation: 0.022 193 | --- !u!4 &46721840 194 | Transform: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | m_GameObject: {fileID: 46721837} 200 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 201 | m_LocalPosition: {x: 0, y: 1, z: -10} 202 | m_LocalScale: {x: 1, y: 1, z: 1} 203 | m_Children: [] 204 | m_Father: {fileID: 0} 205 | m_RootOrder: 0 206 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 207 | --- !u!1001 &1125799542 208 | PrefabInstance: 209 | m_ObjectHideFlags: 0 210 | serializedVersion: 2 211 | m_Modification: 212 | m_TransformParent: {fileID: 0} 213 | m_Modifications: 214 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 215 | type: 3} 216 | propertyPath: m_AnchorMin.y 217 | value: 0 218 | objectReference: {fileID: 0} 219 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 220 | type: 3} 221 | propertyPath: m_AnchorMax.y 222 | value: 0 223 | objectReference: {fileID: 0} 224 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 225 | type: 3} 226 | propertyPath: m_AnchoredPosition.x 227 | value: 0 228 | objectReference: {fileID: 0} 229 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 230 | type: 3} 231 | propertyPath: m_AnchoredPosition.y 232 | value: 0 233 | objectReference: {fileID: 0} 234 | - target: {fileID: 390575499832535188, guid: 9419655a6ab1b524a95d15e08ac510a6, 235 | type: 3} 236 | propertyPath: m_AnchorMin.y 237 | value: 0 238 | objectReference: {fileID: 0} 239 | - target: {fileID: 390575499832535188, guid: 9419655a6ab1b524a95d15e08ac510a6, 240 | type: 3} 241 | propertyPath: m_AnchorMax.y 242 | value: 0 243 | objectReference: {fileID: 0} 244 | - target: {fileID: 390575499832535188, guid: 9419655a6ab1b524a95d15e08ac510a6, 245 | type: 3} 246 | propertyPath: m_AnchoredPosition.x 247 | value: 0 248 | objectReference: {fileID: 0} 249 | - target: {fileID: 390575499832535188, guid: 9419655a6ab1b524a95d15e08ac510a6, 250 | type: 3} 251 | propertyPath: m_AnchoredPosition.y 252 | value: 0 253 | objectReference: {fileID: 0} 254 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 255 | type: 3} 256 | propertyPath: m_AnchorMin.y 257 | value: 0 258 | objectReference: {fileID: 0} 259 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 260 | type: 3} 261 | propertyPath: m_AnchorMax.y 262 | value: 0 263 | objectReference: {fileID: 0} 264 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 265 | type: 3} 266 | propertyPath: m_AnchoredPosition.x 267 | value: 0 268 | objectReference: {fileID: 0} 269 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 270 | type: 3} 271 | propertyPath: m_AnchorMin.y 272 | value: 0 273 | objectReference: {fileID: 0} 274 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 275 | type: 3} 276 | propertyPath: m_AnchorMax.y 277 | value: 0 278 | objectReference: {fileID: 0} 279 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 280 | type: 3} 281 | propertyPath: m_AnchoredPosition.x 282 | value: 0 283 | objectReference: {fileID: 0} 284 | - target: {fileID: 1127137196770117347, guid: 9419655a6ab1b524a95d15e08ac510a6, 285 | type: 3} 286 | propertyPath: m_Name 287 | value: NewResolutionDialog 288 | objectReference: {fileID: 0} 289 | - target: {fileID: 2026627518243740810, guid: 9419655a6ab1b524a95d15e08ac510a6, 290 | type: 3} 291 | propertyPath: m_AnchorMin.y 292 | value: 0 293 | objectReference: {fileID: 0} 294 | - target: {fileID: 2026627518243740810, guid: 9419655a6ab1b524a95d15e08ac510a6, 295 | type: 3} 296 | propertyPath: m_AnchorMax.y 297 | value: 0 298 | objectReference: {fileID: 0} 299 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 300 | type: 3} 301 | propertyPath: m_AnchorMin.y 302 | value: 0 303 | objectReference: {fileID: 0} 304 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 305 | type: 3} 306 | propertyPath: m_AnchorMax.y 307 | value: 0 308 | objectReference: {fileID: 0} 309 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 310 | type: 3} 311 | propertyPath: m_AnchoredPosition.x 312 | value: 0 313 | objectReference: {fileID: 0} 314 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 315 | type: 3} 316 | propertyPath: m_AnchoredPosition.y 317 | value: 0 318 | objectReference: {fileID: 0} 319 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 320 | type: 3} 321 | propertyPath: m_AnchorMin.y 322 | value: 0 323 | objectReference: {fileID: 0} 324 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 325 | type: 3} 326 | propertyPath: m_AnchorMax.y 327 | value: 0 328 | objectReference: {fileID: 0} 329 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 330 | type: 3} 331 | propertyPath: m_AnchoredPosition.x 332 | value: 0 333 | objectReference: {fileID: 0} 334 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 335 | type: 3} 336 | propertyPath: m_AnchoredPosition.y 337 | value: 0 338 | objectReference: {fileID: 0} 339 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 340 | type: 3} 341 | propertyPath: m_AnchorMin.y 342 | value: 0 343 | objectReference: {fileID: 0} 344 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 345 | type: 3} 346 | propertyPath: m_AnchorMax.y 347 | value: 0 348 | objectReference: {fileID: 0} 349 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 350 | type: 3} 351 | propertyPath: m_AnchoredPosition.x 352 | value: 0 353 | objectReference: {fileID: 0} 354 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 355 | type: 3} 356 | propertyPath: m_AnchoredPosition.y 357 | value: 0 358 | objectReference: {fileID: 0} 359 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 360 | type: 3} 361 | propertyPath: m_AnchorMin.y 362 | value: 0 363 | objectReference: {fileID: 0} 364 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 365 | type: 3} 366 | propertyPath: m_AnchorMax.y 367 | value: 0 368 | objectReference: {fileID: 0} 369 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 370 | type: 3} 371 | propertyPath: m_AnchoredPosition.x 372 | value: 0 373 | objectReference: {fileID: 0} 374 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 375 | type: 3} 376 | propertyPath: m_AnchoredPosition.y 377 | value: 0 378 | objectReference: {fileID: 0} 379 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 380 | type: 3} 381 | propertyPath: m_AnchorMin.y 382 | value: 0 383 | objectReference: {fileID: 0} 384 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 385 | type: 3} 386 | propertyPath: m_AnchorMax.y 387 | value: 0 388 | objectReference: {fileID: 0} 389 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 390 | type: 3} 391 | propertyPath: m_AnchoredPosition.x 392 | value: 0 393 | objectReference: {fileID: 0} 394 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 395 | type: 3} 396 | propertyPath: m_AnchoredPosition.y 397 | value: 0 398 | objectReference: {fileID: 0} 399 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 400 | type: 3} 401 | propertyPath: m_AnchorMin.y 402 | value: 0 403 | objectReference: {fileID: 0} 404 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 405 | type: 3} 406 | propertyPath: m_AnchorMax.y 407 | value: 0 408 | objectReference: {fileID: 0} 409 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 410 | type: 3} 411 | propertyPath: m_AnchoredPosition.x 412 | value: 0 413 | objectReference: {fileID: 0} 414 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 415 | type: 3} 416 | propertyPath: m_AnchoredPosition.y 417 | value: 0 418 | objectReference: {fileID: 0} 419 | - target: {fileID: 5662656694570058966, guid: 9419655a6ab1b524a95d15e08ac510a6, 420 | type: 3} 421 | propertyPath: m_AnchorMin.y 422 | value: 0 423 | objectReference: {fileID: 0} 424 | - target: {fileID: 5662656694570058966, guid: 9419655a6ab1b524a95d15e08ac510a6, 425 | type: 3} 426 | propertyPath: m_AnchorMax.y 427 | value: 0 428 | objectReference: {fileID: 0} 429 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 430 | type: 3} 431 | propertyPath: m_LocalPosition.x 432 | value: 0 433 | objectReference: {fileID: 0} 434 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 435 | type: 3} 436 | propertyPath: m_LocalPosition.y 437 | value: 0 438 | objectReference: {fileID: 0} 439 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 440 | type: 3} 441 | propertyPath: m_LocalPosition.z 442 | value: 0 443 | objectReference: {fileID: 0} 444 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 445 | type: 3} 446 | propertyPath: m_LocalRotation.x 447 | value: 0 448 | objectReference: {fileID: 0} 449 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 450 | type: 3} 451 | propertyPath: m_LocalRotation.y 452 | value: 0 453 | objectReference: {fileID: 0} 454 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 455 | type: 3} 456 | propertyPath: m_LocalRotation.z 457 | value: 0 458 | objectReference: {fileID: 0} 459 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 460 | type: 3} 461 | propertyPath: m_LocalRotation.w 462 | value: 1 463 | objectReference: {fileID: 0} 464 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 465 | type: 3} 466 | propertyPath: m_RootOrder 467 | value: 2 468 | objectReference: {fileID: 0} 469 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 470 | type: 3} 471 | propertyPath: m_LocalEulerAnglesHint.x 472 | value: 0 473 | objectReference: {fileID: 0} 474 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 475 | type: 3} 476 | propertyPath: m_LocalEulerAnglesHint.y 477 | value: 0 478 | objectReference: {fileID: 0} 479 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 480 | type: 3} 481 | propertyPath: m_LocalEulerAnglesHint.z 482 | value: 0 483 | objectReference: {fileID: 0} 484 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 485 | type: 3} 486 | propertyPath: m_AnchoredPosition.x 487 | value: 0 488 | objectReference: {fileID: 0} 489 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 490 | type: 3} 491 | propertyPath: m_AnchoredPosition.y 492 | value: 0 493 | objectReference: {fileID: 0} 494 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 495 | type: 3} 496 | propertyPath: m_SizeDelta.x 497 | value: 0 498 | objectReference: {fileID: 0} 499 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 500 | type: 3} 501 | propertyPath: m_SizeDelta.y 502 | value: 0 503 | objectReference: {fileID: 0} 504 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 505 | type: 3} 506 | propertyPath: m_AnchorMin.x 507 | value: 0 508 | objectReference: {fileID: 0} 509 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 510 | type: 3} 511 | propertyPath: m_AnchorMin.y 512 | value: 0 513 | objectReference: {fileID: 0} 514 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 515 | type: 3} 516 | propertyPath: m_AnchorMax.x 517 | value: 0 518 | objectReference: {fileID: 0} 519 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 520 | type: 3} 521 | propertyPath: m_AnchorMax.y 522 | value: 0 523 | objectReference: {fileID: 0} 524 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 525 | type: 3} 526 | propertyPath: m_Pivot.x 527 | value: 0 528 | objectReference: {fileID: 0} 529 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 530 | type: 3} 531 | propertyPath: m_Pivot.y 532 | value: 0 533 | objectReference: {fileID: 0} 534 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 535 | type: 3} 536 | propertyPath: m_AnchorMin.y 537 | value: 0 538 | objectReference: {fileID: 0} 539 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 540 | type: 3} 541 | propertyPath: m_AnchorMax.y 542 | value: 0 543 | objectReference: {fileID: 0} 544 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 545 | type: 3} 546 | propertyPath: m_AnchoredPosition.x 547 | value: 0 548 | objectReference: {fileID: 0} 549 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 550 | type: 3} 551 | propertyPath: m_AnchoredPosition.y 552 | value: 0 553 | objectReference: {fileID: 0} 554 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 555 | type: 3} 556 | propertyPath: m_AnchorMin.y 557 | value: 0 558 | objectReference: {fileID: 0} 559 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 560 | type: 3} 561 | propertyPath: m_AnchorMax.y 562 | value: 0 563 | objectReference: {fileID: 0} 564 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 565 | type: 3} 566 | propertyPath: m_AnchoredPosition.x 567 | value: 0 568 | objectReference: {fileID: 0} 569 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 570 | type: 3} 571 | propertyPath: m_AnchoredPosition.y 572 | value: 0 573 | objectReference: {fileID: 0} 574 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 575 | type: 3} 576 | propertyPath: m_AnchorMin.y 577 | value: 0 578 | objectReference: {fileID: 0} 579 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 580 | type: 3} 581 | propertyPath: m_AnchorMax.y 582 | value: 0 583 | objectReference: {fileID: 0} 584 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 585 | type: 3} 586 | propertyPath: m_AnchoredPosition.x 587 | value: 0 588 | objectReference: {fileID: 0} 589 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 590 | type: 3} 591 | propertyPath: m_AnchoredPosition.y 592 | value: 0 593 | objectReference: {fileID: 0} 594 | m_RemovedComponents: [] 595 | m_SourcePrefab: {fileID: 100100000, guid: 9419655a6ab1b524a95d15e08ac510a6, type: 3} 596 | --- !u!1 &1294539136 597 | GameObject: 598 | m_ObjectHideFlags: 0 599 | m_CorrespondingSourceObject: {fileID: 0} 600 | m_PrefabInstance: {fileID: 0} 601 | m_PrefabAsset: {fileID: 0} 602 | serializedVersion: 6 603 | m_Component: 604 | - component: {fileID: 1294539139} 605 | - component: {fileID: 1294539138} 606 | - component: {fileID: 1294539137} 607 | m_Layer: 0 608 | m_Name: EventSystem 609 | m_TagString: Untagged 610 | m_Icon: {fileID: 0} 611 | m_NavMeshLayer: 0 612 | m_StaticEditorFlags: 0 613 | m_IsActive: 1 614 | --- !u!114 &1294539137 615 | MonoBehaviour: 616 | m_ObjectHideFlags: 0 617 | m_CorrespondingSourceObject: {fileID: 0} 618 | m_PrefabInstance: {fileID: 0} 619 | m_PrefabAsset: {fileID: 0} 620 | m_GameObject: {fileID: 1294539136} 621 | m_Enabled: 1 622 | m_EditorHideFlags: 0 623 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 624 | m_Name: 625 | m_EditorClassIdentifier: 626 | m_HorizontalAxis: Horizontal 627 | m_VerticalAxis: Vertical 628 | m_SubmitButton: Submit 629 | m_CancelButton: Cancel 630 | m_InputActionsPerSecond: 10 631 | m_RepeatDelay: 0.5 632 | m_ForceModuleActive: 0 633 | --- !u!114 &1294539138 634 | MonoBehaviour: 635 | m_ObjectHideFlags: 0 636 | m_CorrespondingSourceObject: {fileID: 0} 637 | m_PrefabInstance: {fileID: 0} 638 | m_PrefabAsset: {fileID: 0} 639 | m_GameObject: {fileID: 1294539136} 640 | m_Enabled: 1 641 | m_EditorHideFlags: 0 642 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 643 | m_Name: 644 | m_EditorClassIdentifier: 645 | m_FirstSelected: {fileID: 0} 646 | m_sendNavigationEvents: 1 647 | m_DragThreshold: 10 648 | --- !u!4 &1294539139 649 | Transform: 650 | m_ObjectHideFlags: 0 651 | m_CorrespondingSourceObject: {fileID: 0} 652 | m_PrefabInstance: {fileID: 0} 653 | m_PrefabAsset: {fileID: 0} 654 | m_GameObject: {fileID: 1294539136} 655 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 656 | m_LocalPosition: {x: 0, y: 0, z: 0} 657 | m_LocalScale: {x: 1, y: 1, z: 1} 658 | m_Children: [] 659 | m_Father: {fileID: 0} 660 | m_RootOrder: 1 661 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 662 | -------------------------------------------------------------------------------- /Scenes/NewResolutionDialog.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31a9d23a424d69345887c08012de3edf 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &705507993 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 705507995} 133 | - component: {fileID: 705507994} 134 | m_Layer: 0 135 | m_Name: Directional Light 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 0 140 | m_IsActive: 1 141 | --- !u!108 &705507994 142 | Light: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 705507993} 148 | m_Enabled: 1 149 | serializedVersion: 10 150 | m_Type: 1 151 | m_Shape: 0 152 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 153 | m_Intensity: 1 154 | m_Range: 10 155 | m_SpotAngle: 30 156 | m_InnerSpotAngle: 21.80208 157 | m_CookieSize: 10 158 | m_Shadows: 159 | m_Type: 2 160 | m_Resolution: -1 161 | m_CustomResolution: -1 162 | m_Strength: 1 163 | m_Bias: 0.05 164 | m_NormalBias: 0.4 165 | m_NearPlane: 0.2 166 | m_CullingMatrixOverride: 167 | e00: 1 168 | e01: 0 169 | e02: 0 170 | e03: 0 171 | e10: 0 172 | e11: 1 173 | e12: 0 174 | e13: 0 175 | e20: 0 176 | e21: 0 177 | e22: 1 178 | e23: 0 179 | e30: 0 180 | e31: 0 181 | e32: 0 182 | e33: 1 183 | m_UseCullingMatrixOverride: 0 184 | m_Cookie: {fileID: 0} 185 | m_DrawHalo: 0 186 | m_Flare: {fileID: 0} 187 | m_RenderMode: 0 188 | m_CullingMask: 189 | serializedVersion: 2 190 | m_Bits: 4294967295 191 | m_RenderingLayerMask: 1 192 | m_Lightmapping: 1 193 | m_LightShadowCasterMode: 0 194 | m_AreaSize: {x: 1, y: 1} 195 | m_BounceIntensity: 1 196 | m_ColorTemperature: 6570 197 | m_UseColorTemperature: 0 198 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 199 | m_UseBoundingSphereOverride: 0 200 | m_ShadowRadius: 0 201 | m_ShadowAngle: 0 202 | --- !u!4 &705507995 203 | Transform: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 705507993} 209 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 210 | m_LocalPosition: {x: 0, y: 3, z: 0} 211 | m_LocalScale: {x: 1, y: 1, z: 1} 212 | m_Children: [] 213 | m_Father: {fileID: 0} 214 | m_RootOrder: 1 215 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 216 | --- !u!1 &963194225 217 | GameObject: 218 | m_ObjectHideFlags: 0 219 | m_CorrespondingSourceObject: {fileID: 0} 220 | m_PrefabInstance: {fileID: 0} 221 | m_PrefabAsset: {fileID: 0} 222 | serializedVersion: 6 223 | m_Component: 224 | - component: {fileID: 963194228} 225 | - component: {fileID: 963194227} 226 | - component: {fileID: 963194226} 227 | m_Layer: 0 228 | m_Name: Main Camera 229 | m_TagString: MainCamera 230 | m_Icon: {fileID: 0} 231 | m_NavMeshLayer: 0 232 | m_StaticEditorFlags: 0 233 | m_IsActive: 1 234 | --- !u!81 &963194226 235 | AudioListener: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | m_GameObject: {fileID: 963194225} 241 | m_Enabled: 1 242 | --- !u!20 &963194227 243 | Camera: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 963194225} 249 | m_Enabled: 1 250 | serializedVersion: 2 251 | m_ClearFlags: 1 252 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 253 | m_projectionMatrixMode: 1 254 | m_GateFitMode: 2 255 | m_FOVAxisMode: 0 256 | m_SensorSize: {x: 36, y: 24} 257 | m_LensShift: {x: 0, y: 0} 258 | m_FocalLength: 50 259 | m_NormalizedViewPortRect: 260 | serializedVersion: 2 261 | x: 0 262 | y: 0 263 | width: 1 264 | height: 1 265 | near clip plane: 0.3 266 | far clip plane: 1000 267 | field of view: 60 268 | orthographic: 0 269 | orthographic size: 5 270 | m_Depth: -1 271 | m_CullingMask: 272 | serializedVersion: 2 273 | m_Bits: 4294967295 274 | m_RenderingPath: -1 275 | m_TargetTexture: {fileID: 0} 276 | m_TargetDisplay: 0 277 | m_TargetEye: 3 278 | m_HDR: 1 279 | m_AllowMSAA: 1 280 | m_AllowDynamicResolution: 0 281 | m_ForceIntoRT: 0 282 | m_OcclusionCulling: 1 283 | m_StereoConvergence: 10 284 | m_StereoSeparation: 0.022 285 | --- !u!4 &963194228 286 | Transform: 287 | m_ObjectHideFlags: 0 288 | m_CorrespondingSourceObject: {fileID: 0} 289 | m_PrefabInstance: {fileID: 0} 290 | m_PrefabAsset: {fileID: 0} 291 | m_GameObject: {fileID: 963194225} 292 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 293 | m_LocalPosition: {x: 0, y: 1, z: -10} 294 | m_LocalScale: {x: 1, y: 1, z: 1} 295 | m_Children: [] 296 | m_Father: {fileID: 0} 297 | m_RootOrder: 0 298 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 299 | --- !u!1 &1636112477 300 | GameObject: 301 | m_ObjectHideFlags: 0 302 | m_CorrespondingSourceObject: {fileID: 0} 303 | m_PrefabInstance: {fileID: 0} 304 | m_PrefabAsset: {fileID: 0} 305 | serializedVersion: 6 306 | m_Component: 307 | - component: {fileID: 1636112480} 308 | - component: {fileID: 1636112479} 309 | - component: {fileID: 1636112478} 310 | m_Layer: 0 311 | m_Name: EventSystem 312 | m_TagString: Untagged 313 | m_Icon: {fileID: 0} 314 | m_NavMeshLayer: 0 315 | m_StaticEditorFlags: 0 316 | m_IsActive: 1 317 | --- !u!114 &1636112478 318 | MonoBehaviour: 319 | m_ObjectHideFlags: 0 320 | m_CorrespondingSourceObject: {fileID: 0} 321 | m_PrefabInstance: {fileID: 0} 322 | m_PrefabAsset: {fileID: 0} 323 | m_GameObject: {fileID: 1636112477} 324 | m_Enabled: 1 325 | m_EditorHideFlags: 0 326 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 327 | m_Name: 328 | m_EditorClassIdentifier: 329 | m_HorizontalAxis: Horizontal 330 | m_VerticalAxis: Vertical 331 | m_SubmitButton: Submit 332 | m_CancelButton: Cancel 333 | m_InputActionsPerSecond: 10 334 | m_RepeatDelay: 0.5 335 | m_ForceModuleActive: 0 336 | --- !u!114 &1636112479 337 | MonoBehaviour: 338 | m_ObjectHideFlags: 0 339 | m_CorrespondingSourceObject: {fileID: 0} 340 | m_PrefabInstance: {fileID: 0} 341 | m_PrefabAsset: {fileID: 0} 342 | m_GameObject: {fileID: 1636112477} 343 | m_Enabled: 1 344 | m_EditorHideFlags: 0 345 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 346 | m_Name: 347 | m_EditorClassIdentifier: 348 | m_FirstSelected: {fileID: 0} 349 | m_sendNavigationEvents: 1 350 | m_DragThreshold: 10 351 | --- !u!4 &1636112480 352 | Transform: 353 | m_ObjectHideFlags: 0 354 | m_CorrespondingSourceObject: {fileID: 0} 355 | m_PrefabInstance: {fileID: 0} 356 | m_PrefabAsset: {fileID: 0} 357 | m_GameObject: {fileID: 1636112477} 358 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 359 | m_LocalPosition: {x: 0, y: 0, z: 0} 360 | m_LocalScale: {x: 1, y: 1, z: 1} 361 | m_Children: [] 362 | m_Father: {fileID: 0} 363 | m_RootOrder: 3 364 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 365 | --- !u!1 &1760537363 366 | GameObject: 367 | m_ObjectHideFlags: 0 368 | m_CorrespondingSourceObject: {fileID: 0} 369 | m_PrefabInstance: {fileID: 0} 370 | m_PrefabAsset: {fileID: 0} 371 | serializedVersion: 6 372 | m_Component: 373 | - component: {fileID: 1760537367} 374 | - component: {fileID: 1760537366} 375 | - component: {fileID: 1760537365} 376 | - component: {fileID: 1760537364} 377 | m_Layer: 0 378 | m_Name: Sphere 379 | m_TagString: Untagged 380 | m_Icon: {fileID: 0} 381 | m_NavMeshLayer: 0 382 | m_StaticEditorFlags: 0 383 | m_IsActive: 1 384 | --- !u!135 &1760537364 385 | SphereCollider: 386 | m_ObjectHideFlags: 0 387 | m_CorrespondingSourceObject: {fileID: 0} 388 | m_PrefabInstance: {fileID: 0} 389 | m_PrefabAsset: {fileID: 0} 390 | m_GameObject: {fileID: 1760537363} 391 | m_Material: {fileID: 0} 392 | m_IsTrigger: 0 393 | m_Enabled: 1 394 | serializedVersion: 2 395 | m_Radius: 0.5 396 | m_Center: {x: 0, y: 0, z: 0} 397 | --- !u!23 &1760537365 398 | MeshRenderer: 399 | m_ObjectHideFlags: 0 400 | m_CorrespondingSourceObject: {fileID: 0} 401 | m_PrefabInstance: {fileID: 0} 402 | m_PrefabAsset: {fileID: 0} 403 | m_GameObject: {fileID: 1760537363} 404 | m_Enabled: 1 405 | m_CastShadows: 1 406 | m_ReceiveShadows: 1 407 | m_DynamicOccludee: 1 408 | m_MotionVectors: 1 409 | m_LightProbeUsage: 1 410 | m_ReflectionProbeUsage: 1 411 | m_RayTracingMode: 2 412 | m_RenderingLayerMask: 1 413 | m_RendererPriority: 0 414 | m_Materials: 415 | - {fileID: 15303, guid: 0000000000000000f000000000000000, type: 0} 416 | m_StaticBatchInfo: 417 | firstSubMesh: 0 418 | subMeshCount: 0 419 | m_StaticBatchRoot: {fileID: 0} 420 | m_ProbeAnchor: {fileID: 0} 421 | m_LightProbeVolumeOverride: {fileID: 0} 422 | m_ScaleInLightmap: 1 423 | m_ReceiveGI: 1 424 | m_PreserveUVs: 0 425 | m_IgnoreNormalsForChartDetection: 0 426 | m_ImportantGI: 0 427 | m_StitchLightmapSeams: 1 428 | m_SelectedEditorRenderState: 3 429 | m_MinimumChartSize: 4 430 | m_AutoUVMaxDistance: 0.5 431 | m_AutoUVMaxAngle: 89 432 | m_LightmapParameters: {fileID: 0} 433 | m_SortingLayerID: 0 434 | m_SortingLayer: 0 435 | m_SortingOrder: 0 436 | --- !u!33 &1760537366 437 | MeshFilter: 438 | m_ObjectHideFlags: 0 439 | m_CorrespondingSourceObject: {fileID: 0} 440 | m_PrefabInstance: {fileID: 0} 441 | m_PrefabAsset: {fileID: 0} 442 | m_GameObject: {fileID: 1760537363} 443 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 444 | --- !u!4 &1760537367 445 | Transform: 446 | m_ObjectHideFlags: 0 447 | m_CorrespondingSourceObject: {fileID: 0} 448 | m_PrefabInstance: {fileID: 0} 449 | m_PrefabAsset: {fileID: 0} 450 | m_GameObject: {fileID: 1760537363} 451 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 452 | m_LocalPosition: {x: 0, y: 1, z: -9} 453 | m_LocalScale: {x: 1, y: 1, z: 1} 454 | m_Children: [] 455 | m_Father: {fileID: 0} 456 | m_RootOrder: 2 457 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 458 | --- !u!1001 &1783998449 459 | PrefabInstance: 460 | m_ObjectHideFlags: 0 461 | serializedVersion: 2 462 | m_Modification: 463 | m_TransformParent: {fileID: 0} 464 | m_Modifications: 465 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 466 | type: 3} 467 | propertyPath: m_AnchorMin.y 468 | value: 0 469 | objectReference: {fileID: 0} 470 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 471 | type: 3} 472 | propertyPath: m_AnchorMax.y 473 | value: 0 474 | objectReference: {fileID: 0} 475 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 476 | type: 3} 477 | propertyPath: m_AnchoredPosition.x 478 | value: 0 479 | objectReference: {fileID: 0} 480 | - target: {fileID: 91407676045821865, guid: 9419655a6ab1b524a95d15e08ac510a6, 481 | type: 3} 482 | propertyPath: m_AnchoredPosition.y 483 | value: 0 484 | objectReference: {fileID: 0} 485 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 486 | type: 3} 487 | propertyPath: m_AnchorMin.y 488 | value: 0 489 | objectReference: {fileID: 0} 490 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 491 | type: 3} 492 | propertyPath: m_AnchorMax.y 493 | value: 0 494 | objectReference: {fileID: 0} 495 | - target: {fileID: 531225468586491033, guid: 9419655a6ab1b524a95d15e08ac510a6, 496 | type: 3} 497 | propertyPath: m_AnchoredPosition.x 498 | value: 0 499 | objectReference: {fileID: 0} 500 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 501 | type: 3} 502 | propertyPath: m_AnchorMin.y 503 | value: 0 504 | objectReference: {fileID: 0} 505 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 506 | type: 3} 507 | propertyPath: m_AnchorMax.y 508 | value: 0 509 | objectReference: {fileID: 0} 510 | - target: {fileID: 751550486614473266, guid: 9419655a6ab1b524a95d15e08ac510a6, 511 | type: 3} 512 | propertyPath: m_AnchoredPosition.x 513 | value: 0 514 | objectReference: {fileID: 0} 515 | - target: {fileID: 1127137196770117347, guid: 9419655a6ab1b524a95d15e08ac510a6, 516 | type: 3} 517 | propertyPath: m_Name 518 | value: NewResolutionDialog 519 | objectReference: {fileID: 0} 520 | - target: {fileID: 2026627518243740810, guid: 9419655a6ab1b524a95d15e08ac510a6, 521 | type: 3} 522 | propertyPath: m_AnchorMin.y 523 | value: 0 524 | objectReference: {fileID: 0} 525 | - target: {fileID: 2026627518243740810, guid: 9419655a6ab1b524a95d15e08ac510a6, 526 | type: 3} 527 | propertyPath: m_AnchorMax.y 528 | value: 0 529 | objectReference: {fileID: 0} 530 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 531 | type: 3} 532 | propertyPath: m_AnchorMin.y 533 | value: 0 534 | objectReference: {fileID: 0} 535 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 536 | type: 3} 537 | propertyPath: m_AnchorMax.y 538 | value: 0 539 | objectReference: {fileID: 0} 540 | - target: {fileID: 2250163269422632597, guid: 9419655a6ab1b524a95d15e08ac510a6, 541 | type: 3} 542 | propertyPath: m_AnchoredPosition.x 543 | value: 0 544 | objectReference: {fileID: 0} 545 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 546 | type: 3} 547 | propertyPath: m_AnchorMin.y 548 | value: 0 549 | objectReference: {fileID: 0} 550 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 551 | type: 3} 552 | propertyPath: m_AnchorMax.y 553 | value: 0 554 | objectReference: {fileID: 0} 555 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 556 | type: 3} 557 | propertyPath: m_AnchoredPosition.x 558 | value: 0 559 | objectReference: {fileID: 0} 560 | - target: {fileID: 2451575418539614563, guid: 9419655a6ab1b524a95d15e08ac510a6, 561 | type: 3} 562 | propertyPath: m_AnchoredPosition.y 563 | value: 0 564 | objectReference: {fileID: 0} 565 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 566 | type: 3} 567 | propertyPath: m_AnchorMin.y 568 | value: 0 569 | objectReference: {fileID: 0} 570 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 571 | type: 3} 572 | propertyPath: m_AnchorMax.y 573 | value: 0 574 | objectReference: {fileID: 0} 575 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 576 | type: 3} 577 | propertyPath: m_AnchoredPosition.x 578 | value: 0 579 | objectReference: {fileID: 0} 580 | - target: {fileID: 2650204436581752871, guid: 9419655a6ab1b524a95d15e08ac510a6, 581 | type: 3} 582 | propertyPath: m_AnchoredPosition.y 583 | value: 0 584 | objectReference: {fileID: 0} 585 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 586 | type: 3} 587 | propertyPath: m_AnchorMin.y 588 | value: 0 589 | objectReference: {fileID: 0} 590 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 591 | type: 3} 592 | propertyPath: m_AnchorMax.y 593 | value: 0 594 | objectReference: {fileID: 0} 595 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 596 | type: 3} 597 | propertyPath: m_AnchoredPosition.x 598 | value: 0 599 | objectReference: {fileID: 0} 600 | - target: {fileID: 3206967380581947442, guid: 9419655a6ab1b524a95d15e08ac510a6, 601 | type: 3} 602 | propertyPath: m_AnchoredPosition.y 603 | value: 0 604 | objectReference: {fileID: 0} 605 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 606 | type: 3} 607 | propertyPath: m_AnchorMin.y 608 | value: 0 609 | objectReference: {fileID: 0} 610 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 611 | type: 3} 612 | propertyPath: m_AnchorMax.y 613 | value: 0 614 | objectReference: {fileID: 0} 615 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 616 | type: 3} 617 | propertyPath: m_AnchoredPosition.x 618 | value: 0 619 | objectReference: {fileID: 0} 620 | - target: {fileID: 4289435599314498096, guid: 9419655a6ab1b524a95d15e08ac510a6, 621 | type: 3} 622 | propertyPath: m_AnchoredPosition.y 623 | value: 0 624 | objectReference: {fileID: 0} 625 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 626 | type: 3} 627 | propertyPath: m_AnchorMin.y 628 | value: 0 629 | objectReference: {fileID: 0} 630 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 631 | type: 3} 632 | propertyPath: m_AnchorMax.y 633 | value: 0 634 | objectReference: {fileID: 0} 635 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 636 | type: 3} 637 | propertyPath: m_AnchoredPosition.x 638 | value: 0 639 | objectReference: {fileID: 0} 640 | - target: {fileID: 5026982428623439544, guid: 9419655a6ab1b524a95d15e08ac510a6, 641 | type: 3} 642 | propertyPath: m_AnchoredPosition.y 643 | value: 0 644 | objectReference: {fileID: 0} 645 | - target: {fileID: 5662656694570058966, guid: 9419655a6ab1b524a95d15e08ac510a6, 646 | type: 3} 647 | propertyPath: m_AnchorMin.y 648 | value: 0 649 | objectReference: {fileID: 0} 650 | - target: {fileID: 5662656694570058966, guid: 9419655a6ab1b524a95d15e08ac510a6, 651 | type: 3} 652 | propertyPath: m_AnchorMax.y 653 | value: 0 654 | objectReference: {fileID: 0} 655 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 656 | type: 3} 657 | propertyPath: m_LocalPosition.x 658 | value: 0 659 | objectReference: {fileID: 0} 660 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 661 | type: 3} 662 | propertyPath: m_LocalPosition.y 663 | value: 0 664 | objectReference: {fileID: 0} 665 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 666 | type: 3} 667 | propertyPath: m_LocalPosition.z 668 | value: 0 669 | objectReference: {fileID: 0} 670 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 671 | type: 3} 672 | propertyPath: m_LocalRotation.x 673 | value: 0 674 | objectReference: {fileID: 0} 675 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 676 | type: 3} 677 | propertyPath: m_LocalRotation.y 678 | value: 0 679 | objectReference: {fileID: 0} 680 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 681 | type: 3} 682 | propertyPath: m_LocalRotation.z 683 | value: 0 684 | objectReference: {fileID: 0} 685 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 686 | type: 3} 687 | propertyPath: m_LocalRotation.w 688 | value: 1 689 | objectReference: {fileID: 0} 690 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 691 | type: 3} 692 | propertyPath: m_RootOrder 693 | value: 4 694 | objectReference: {fileID: 0} 695 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 696 | type: 3} 697 | propertyPath: m_LocalEulerAnglesHint.x 698 | value: 0 699 | objectReference: {fileID: 0} 700 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 701 | type: 3} 702 | propertyPath: m_LocalEulerAnglesHint.y 703 | value: 0 704 | objectReference: {fileID: 0} 705 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 706 | type: 3} 707 | propertyPath: m_LocalEulerAnglesHint.z 708 | value: 0 709 | objectReference: {fileID: 0} 710 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 711 | type: 3} 712 | propertyPath: m_AnchoredPosition.x 713 | value: 0 714 | objectReference: {fileID: 0} 715 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 716 | type: 3} 717 | propertyPath: m_AnchoredPosition.y 718 | value: 0 719 | objectReference: {fileID: 0} 720 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 721 | type: 3} 722 | propertyPath: m_SizeDelta.x 723 | value: 0 724 | objectReference: {fileID: 0} 725 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 726 | type: 3} 727 | propertyPath: m_SizeDelta.y 728 | value: 0 729 | objectReference: {fileID: 0} 730 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 731 | type: 3} 732 | propertyPath: m_AnchorMin.x 733 | value: 0 734 | objectReference: {fileID: 0} 735 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 736 | type: 3} 737 | propertyPath: m_AnchorMin.y 738 | value: 0 739 | objectReference: {fileID: 0} 740 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 741 | type: 3} 742 | propertyPath: m_AnchorMax.x 743 | value: 0 744 | objectReference: {fileID: 0} 745 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 746 | type: 3} 747 | propertyPath: m_AnchorMax.y 748 | value: 0 749 | objectReference: {fileID: 0} 750 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 751 | type: 3} 752 | propertyPath: m_Pivot.x 753 | value: 0 754 | objectReference: {fileID: 0} 755 | - target: {fileID: 6641450590001762801, guid: 9419655a6ab1b524a95d15e08ac510a6, 756 | type: 3} 757 | propertyPath: m_Pivot.y 758 | value: 0 759 | objectReference: {fileID: 0} 760 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 761 | type: 3} 762 | propertyPath: m_AnchorMin.y 763 | value: 0 764 | objectReference: {fileID: 0} 765 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 766 | type: 3} 767 | propertyPath: m_AnchorMax.y 768 | value: 0 769 | objectReference: {fileID: 0} 770 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 771 | type: 3} 772 | propertyPath: m_AnchoredPosition.x 773 | value: 0 774 | objectReference: {fileID: 0} 775 | - target: {fileID: 6941832233949931479, guid: 9419655a6ab1b524a95d15e08ac510a6, 776 | type: 3} 777 | propertyPath: m_AnchoredPosition.y 778 | value: 0 779 | objectReference: {fileID: 0} 780 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 781 | type: 3} 782 | propertyPath: m_AnchorMin.y 783 | value: 0 784 | objectReference: {fileID: 0} 785 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 786 | type: 3} 787 | propertyPath: m_AnchorMax.y 788 | value: 0 789 | objectReference: {fileID: 0} 790 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 791 | type: 3} 792 | propertyPath: m_AnchoredPosition.x 793 | value: 0 794 | objectReference: {fileID: 0} 795 | - target: {fileID: 7245539976638886440, guid: 9419655a6ab1b524a95d15e08ac510a6, 796 | type: 3} 797 | propertyPath: m_AnchoredPosition.y 798 | value: 0 799 | objectReference: {fileID: 0} 800 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 801 | type: 3} 802 | propertyPath: m_AnchorMin.y 803 | value: 0 804 | objectReference: {fileID: 0} 805 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 806 | type: 3} 807 | propertyPath: m_AnchorMax.y 808 | value: 0 809 | objectReference: {fileID: 0} 810 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 811 | type: 3} 812 | propertyPath: m_AnchoredPosition.x 813 | value: 0 814 | objectReference: {fileID: 0} 815 | - target: {fileID: 8292004812583903199, guid: 9419655a6ab1b524a95d15e08ac510a6, 816 | type: 3} 817 | propertyPath: m_AnchoredPosition.y 818 | value: 0 819 | objectReference: {fileID: 0} 820 | m_RemovedComponents: [] 821 | m_SourcePrefab: {fileID: 100100000, guid: 9419655a6ab1b524a95d15e08ac510a6, type: 3} 822 | -------------------------------------------------------------------------------- /Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7ab3105d2f7e5f47a24e677d51dea14 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78a87534d5cc1f14890bff2a0bc6b4a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Controller/ButtonHandler.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.SceneManagement; 3 | using UnityEngine.UI; 4 | 5 | #pragma warning disable 0649 6 | 7 | namespace NewResolutionDialog.Scripts.Controller 8 | { 9 | public class ButtonHandler : MonoBehaviour 10 | { 11 | [SerializeField] Settings settings; 12 | [SerializeField] Button playButton; 13 | [SerializeField] Button quitButton; 14 | [SerializeField] Button closeButton; 15 | 16 | private void OnEnable() 17 | { 18 | var isLaunchScene = settings.dialogStyle == ResolutionDialogStyle.LaunchDialog; 19 | playButton.gameObject.SetActive(isLaunchScene); 20 | quitButton.gameObject.SetActive(isLaunchScene); 21 | closeButton.gameObject.SetActive(!isLaunchScene); 22 | } 23 | 24 | public void OnPlay() 25 | { 26 | // just load the next scene in the "included in build" scenes list 27 | SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); 28 | } 29 | 30 | public void OnQuit() 31 | { 32 | // either quit or leave play mode 33 | #if UNITY_EDITOR 34 | UnityEditor.EditorApplication.isPlaying = false; 35 | #else 36 | Application.Quit(); 37 | #endif 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Scripts/Controller/ButtonHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89cff907e47f4d24f8f40573db785f01 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Controller/CreateEventSystemIfNoneExists.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.EventSystems; 3 | 4 | namespace NewResolutionDialog.Scripts.Controller 5 | { 6 | [ExecuteInEditMode] 7 | public class CreateEventSystemIfNoneExists : MonoBehaviour 8 | { 9 | private void Awake() 10 | { 11 | // in case prefab gets dropped onto a scene, check if an event system exists and if not, create one 12 | // this is to avoid any issues due to a scene not having an event system because adding prefabs to a scene 13 | // apparently doesn't add the event system even if the prefab contains a canvas with UI controls 14 | if (FindObjectOfType() == null) 15 | { 16 | new GameObject("EventSystem", typeof(EventSystem), typeof(StandaloneInputModule)); 17 | Debug.Log("NewResolutionDialog added 'EventSystem' to Scene."); 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Scripts/Controller/CreateEventSystemIfNoneExists.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49bd7edf1a3280848bdc998354bbd146 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Controller/FpsLabel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | #pragma warning disable 0649 5 | 6 | namespace NewResolutionDialog.Scripts.Controller 7 | { 8 | public class FpsLabel : MonoBehaviour 9 | { 10 | [SerializeField] Text fpsLabel; 11 | [SerializeField] float updateRateSeconds = 0.5f; 12 | 13 | int frameCount = 0; 14 | float deltaTime = 0f; 15 | float fps = 0f; 16 | 17 | void Update() 18 | { 19 | frameCount++; 20 | deltaTime += Time.unscaledDeltaTime; 21 | if (deltaTime > updateRateSeconds) 22 | { 23 | fps = frameCount / deltaTime; 24 | frameCount = 0; 25 | deltaTime -= updateRateSeconds; 26 | } 27 | 28 | fpsLabel.text = string.Format("{0} fps", (int)(fps + 0.5f)); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Scripts/Controller/FpsLabel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6237689ae8f19734698a8f9d45192905 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Controller/GraphicSettingsHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | 7 | #pragma warning disable 0649 8 | 9 | namespace NewResolutionDialog.Scripts.Controller 10 | { 11 | public class GraphicSettingsHandler : MonoBehaviour 12 | { 13 | #region Fields and Stuff 14 | [SerializeField] Dropdown resolution; 15 | [SerializeField] Dropdown refreshRate; 16 | [SerializeField] Dropdown fullScreenMode; 17 | [SerializeField] Dropdown vSync; 18 | [SerializeField] Text vSyncNote; 19 | [SerializeField] Dropdown quality; 20 | [SerializeField] Dropdown display; 21 | [SerializeField] Text displayNote; 22 | 23 | static readonly string hzSuffix = " Hz"; 24 | static readonly string prefsKey_RefreshRate = "NewResolutionDialog_RefreshRate"; 25 | static readonly string prefsKey_VSyncCount = "NewResolutionDialog_vSyncCount"; 26 | 27 | Dictionary> refreshRates = new Dictionary>(); 28 | bool updatingDialog = true; 29 | #endregion 30 | 31 | #region Dialog Getters 32 | string GetSelectedResolution() 33 | { 34 | return resolution.options[resolution.value].text; 35 | } 36 | string GetResolutionString() 37 | { 38 | return GetResolutionString(Screen.width, Screen.height); 39 | } 40 | string GetResolutionString(int w, int h) 41 | { 42 | return string.Format("{0}x{1}", w, h); 43 | } 44 | 45 | string GetSelectedRefreshRate() 46 | { 47 | return refreshRate.options[refreshRate.value].text.Replace(hzSuffix, ""); 48 | } 49 | 50 | FullScreenMode GetSelectedFullScreenMode() 51 | { 52 | var mode = (FullScreenMode)fullScreenMode.value; 53 | 54 | // In the dropdown "MaximizedWindow" (#2 in enum) was removed because it ain't working, it is now "Windowed" (#3 in enum), hence this fix 55 | // see: https://issuetracker.unity3d.com/issues/fullscreen-mode-maximized-window-functionality-is-broken-and-any-built-player-changes-to-non-window-mode-when-maximizing 56 | if (mode == FullScreenMode.MaximizedWindow) 57 | mode = FullScreenMode.Windowed; 58 | 59 | return mode; 60 | } 61 | #endregion 62 | 63 | #region Debug 64 | void LogRefreshRates() 65 | { 66 | var sb = new StringBuilder("\n"); 67 | foreach (var kvp in refreshRates) 68 | { 69 | sb.AppendFormat("{0} => ", kvp.Key); 70 | foreach (var hz in kvp.Value) 71 | { 72 | sb.AppendFormat("{0}, ", hz); 73 | } 74 | sb.Append("\n"); 75 | } 76 | 77 | sb.Append("\n"); 78 | Debug.Log(sb); 79 | } 80 | #endregion 81 | 82 | #region Unity Startup 83 | void Awake() 84 | { 85 | displayNote.gameObject.SetActive(false); 86 | vSyncNote.gameObject.SetActive(false); 87 | 88 | var hz = PlayerPrefs.GetInt(prefsKey_RefreshRate, 0); 89 | if (hz != 0) 90 | { 91 | if (hz != Screen.currentResolution.refreshRate) 92 | { 93 | SetResolution(Screen.width, Screen.height, Screen.fullScreenMode, PlayerPrefs.GetInt(prefsKey_RefreshRate, 0)); 94 | UpdateDialogAfterEndOfFrame(); 95 | } 96 | } 97 | 98 | var vSyncCount = PlayerPrefs.GetInt(prefsKey_VSyncCount, QualitySettings.vSyncCount); 99 | if (vSyncCount != QualitySettings.vSyncCount) 100 | QualitySettings.vSyncCount = PlayerPrefs.GetInt(prefsKey_VSyncCount, QualitySettings.vSyncCount); 101 | } 102 | 103 | void OnEnable() 104 | { 105 | PopulateDropdowns(); 106 | ApplyCurrentSettingsToDialog(); 107 | UpdateDialogInteractability(); 108 | } 109 | #endregion 110 | 111 | #region PopulateDropdowns 112 | void PopulateDropdowns() 113 | { 114 | PopulateResolutionsDropdown(); 115 | PopulateRefresRateDropdown(); 116 | PopulateQualityDropdown(); 117 | PopulateMonitorDropdown(); 118 | } 119 | 120 | void PopulateResolutionsDropdown() 121 | { 122 | refreshRates.Clear(); 123 | resolution.ClearOptions(); 124 | var options = new List(); 125 | var resolutions = Screen.resolutions; 126 | var isWindowed = Screen.fullScreenMode == FullScreenMode.Windowed; 127 | var isFullScreenWindow = Screen.fullScreenMode == FullScreenMode.FullScreenWindow; 128 | var systemWidth = Display.main.systemWidth; 129 | var systemHeight = Display.main.systemHeight; 130 | 131 | foreach (var res in resolutions) 132 | { 133 | var resParts = res.ToString().Split(new char[] { 'x', '@', 'H' }); 134 | var width = int.Parse(resParts[0].Trim()); 135 | var height = int.Parse(resParts[1].Trim()); 136 | 137 | // skip resolutions that won't fit in windowed modes 138 | if (isWindowed && (width >= systemWidth || height >= systemHeight)) 139 | continue; 140 | if (isFullScreenWindow && (width > systemWidth || height > systemHeight)) 141 | continue; 142 | 143 | // resolution 144 | var resString = GetResolutionString(width, height); 145 | if (refreshRates.ContainsKey(resString) == false) 146 | { 147 | refreshRates.Add(resString, new List()); 148 | var option = new Dropdown.OptionData(resString); 149 | options.Add(option); 150 | } 151 | 152 | // refresh rates without 'Hz' suffix 153 | var hz = resParts[2].Trim(); 154 | refreshRates[resString].Add(hz); 155 | } 156 | 157 | resolution.AddOptions(options); 158 | } 159 | void PopulateRefresRateDropdown() 160 | { 161 | refreshRate.ClearOptions(); 162 | var options = new List(); 163 | 164 | var selectedRes = GetResolutionString(); 165 | 166 | if (refreshRates.ContainsKey(selectedRes)) 167 | { 168 | var refreshRatesForCurrentRes = refreshRates[selectedRes]; 169 | 170 | foreach (var hz in refreshRatesForCurrentRes) 171 | { 172 | var option = new Dropdown.OptionData(hz + hzSuffix); 173 | options.Add(option); 174 | } 175 | 176 | refreshRate.AddOptions(options); 177 | } 178 | } 179 | 180 | void PopulateQualityDropdown() 181 | { 182 | var options = new List(); 183 | 184 | Dropdown.OptionData currentOption = null; 185 | var currentLevel = QualitySettings.GetQualityLevel(); 186 | var qualityLevels = QualitySettings.names; 187 | foreach (var quality in qualityLevels) 188 | { 189 | var option = new Dropdown.OptionData(quality); 190 | options.Add(option); 191 | 192 | // remember initial quality level 193 | if (quality == qualityLevels[currentLevel]) 194 | currentOption = option; 195 | } 196 | 197 | quality.ClearOptions(); 198 | quality.AddOptions(options); 199 | } 200 | 201 | void PopulateMonitorDropdown() 202 | { 203 | display.ClearOptions(); 204 | var options = new List(); 205 | 206 | Dropdown.OptionData currentOption = null; 207 | for (int i = 0; i < Display.displays.Length; i++) 208 | { 209 | var display = Display.displays[i]; 210 | 211 | var displayString = "Diplay " + (i + 1) + " (" + GetResolutionString(display.systemWidth, display.systemHeight) + ")"; 212 | var option = new Dropdown.OptionData(displayString); 213 | options.Add(option); 214 | 215 | // select active display 216 | if (display.active) 217 | currentOption = option; 218 | } 219 | 220 | display.AddOptions(options); 221 | } 222 | #endregion 223 | 224 | #region UpdateDialogWithCurrentSettings 225 | void ApplyCurrentSettingsToDialog() 226 | { 227 | updatingDialog = true; 228 | 229 | SelectCurrentResolutionDropdownItem(); 230 | SelectCurrentRefreshRateDropdownItem(); 231 | SelectCurrentFullScreenModeDropdownItem(); 232 | SelectCurrentVSyncCountDropdownItem(); 233 | SelectCurrentQualityLevelDropdownItem(); 234 | SelectCurrentDisplayDropdownItem(); 235 | 236 | updatingDialog = false; 237 | } 238 | 239 | void SelectCurrentResolutionDropdownItem() 240 | { 241 | // select highest by default 242 | resolution.value = resolution.options.Count - 1; 243 | 244 | var res = GetResolutionString(); 245 | for (int i = 0; i < resolution.options.Count; i++) 246 | { 247 | if (resolution.options[i].text == res) 248 | { 249 | resolution.value = i; 250 | break; 251 | } 252 | } 253 | } 254 | 255 | void SelectCurrentRefreshRateDropdownItem() 256 | { 257 | // try to find closest Hz 258 | var hz = Screen.currentResolution.refreshRate; 259 | 260 | var closestDiff = int.MaxValue; 261 | var closestOptionIndex = refreshRate.options.Count - 1; 262 | for (int i = 0; i < refreshRate.options.Count; i++) 263 | { 264 | var optionHz = int.Parse(refreshRate.options[i].text.Replace(hzSuffix, "")); 265 | var diff = Mathf.Abs(hz - optionHz); 266 | if (diff < closestDiff) 267 | { 268 | closestDiff = diff; 269 | closestOptionIndex = i; 270 | if (closestDiff == 0) 271 | break; 272 | } 273 | } 274 | 275 | refreshRate.value = closestOptionIndex; 276 | } 277 | 278 | void SelectCurrentFullScreenModeDropdownItem() 279 | { 280 | var mode = Screen.fullScreenMode; 281 | if (Screen.fullScreenMode == FullScreenMode.MaximizedWindow) 282 | mode = FullScreenMode.FullScreenWindow; 283 | 284 | fullScreenMode.value = (int)mode; 285 | } 286 | 287 | void SelectCurrentVSyncCountDropdownItem() 288 | { 289 | vSync.value = QualitySettings.vSyncCount; 290 | 291 | // push a fair warning to users disabling vsync ignoring freesync/gsync users for whom this setting makes sense 292 | // in the majority of use cases, particularly on battery-powered devices, turning vsync off is detrimental to battery life and comfort (excess heat, noise) 293 | vSyncNote.gameObject.SetActive(QualitySettings.vSyncCount == 0); 294 | } 295 | 296 | void SelectCurrentQualityLevelDropdownItem() 297 | { 298 | quality.value = QualitySettings.GetQualityLevel(); 299 | } 300 | void SelectCurrentDisplayDropdownItem() 301 | { 302 | // take the first active display 303 | for (int i = 0; i < Display.displays.Length; i++) 304 | { 305 | if (Display.displays[i].active) 306 | { 307 | display.value = i; 308 | break; 309 | } 310 | } 311 | } 312 | #endregion 313 | 314 | #region UpdateInteractability 315 | void UpdateDialogInteractability() 316 | { 317 | if (Application.isEditor) 318 | { 319 | // in editor mode these settings are not applicable, some can be changed through the game view's settings (ie resolution) 320 | resolution.interactable = false; // change this through game view 321 | SetRefreshRateInteractable(false); // not applicable, always refresh rate of desktop 322 | fullScreenMode.interactable = false; // not applicable, always "windowed" 323 | vSync.interactable = false; // not applicable, vsync has no effect in editor mode 324 | quality.interactable = quality.options.Count > 1; // interactable if there is more than one quality level to select from 325 | display.interactable = false; // not applicable, same display as editor runs on unless game view is detached 326 | } 327 | else 328 | { 329 | resolution.interactable = true; // always interactable 330 | SetRefreshRateInteractable(Screen.fullScreenMode == FullScreenMode.ExclusiveFullScreen); // only in fullscreen mode, the window modes use desktop refresh rate 331 | fullScreenMode.interactable = true; // always interactable 332 | vSync.interactable = true; // always interactable 333 | quality.interactable = quality.options.Count > 1; // interactable if there is more than one quality level to select from 334 | display.interactable = display.options.Count > 1; // only interactable if there are multiple displays 335 | } 336 | } 337 | 338 | void SetRefreshRateInteractable(bool interactable) 339 | { 340 | if (!interactable) 341 | { 342 | refreshRate.ClearOptions(); 343 | refreshRate.AddOptions(new List() { "N/A" }); 344 | } 345 | 346 | // only allow interactable if there are multiple refresh rates to select from 347 | refreshRate.interactable = interactable && refreshRates[GetResolutionString()].Count > 1; 348 | } 349 | #endregion 350 | 351 | #region Event Handlers 352 | public void OnResolutionChanged() 353 | { 354 | if (updatingDialog) 355 | return; 356 | 357 | ApplySelectedResolution(); 358 | UpdateDialogAfterEndOfFrame(); 359 | } 360 | 361 | public void OnRefreshRateChanged() 362 | { 363 | if (updatingDialog) 364 | return; 365 | 366 | int hz = 0; 367 | int.TryParse(GetSelectedRefreshRate(), out hz); 368 | PlayerPrefs.SetInt(prefsKey_RefreshRate, hz); 369 | 370 | ApplySelectedResolution(); 371 | UpdateDialogAfterEndOfFrame(); 372 | } 373 | 374 | public void OnFullScreenModeChanged() 375 | { 376 | if (updatingDialog) 377 | return; 378 | 379 | var wasWindowed = Screen.fullScreenMode == FullScreenMode.Windowed; 380 | 381 | var mode = GetSelectedFullScreenMode(); 382 | Screen.fullScreenMode = mode; 383 | 384 | if (mode == FullScreenMode.Windowed) 385 | { 386 | var selectedRes = GetSelectedResolution(); 387 | var resolution = selectedRes.Split(new char[] { 'x' }); 388 | var width = int.Parse(resolution[0]); 389 | var height = int.Parse(resolution[1]); 390 | var screenWidth = Display.main.systemWidth; 391 | var screenHeight = Display.main.systemHeight; 392 | //Debug.LogError("cur w/h: " + width + "x" + height + ", max w/h: " + screenWidth + "x" + screenHeight + ", Scr w/h: " + Screen.width + "x" + Screen.height + 393 | // ", DspR w/h: " + Display.main.renderingWidth + "x" + Display.main.renderingHeight + ", DspS w/h: " + Display.main.systemWidth + "x" + Display.main.systemHeight); 394 | 395 | if (width >= screenWidth || height >= screenHeight) 396 | { 397 | var closestWidth = screenWidth; 398 | var closestHeight = screenHeight; 399 | foreach (var res in Screen.resolutions) 400 | { 401 | if (res.width < screenWidth && res.height < screenHeight) 402 | { 403 | closestWidth = res.width; 404 | closestHeight = res.height; 405 | } 406 | } 407 | 408 | // set to resolution closest to desktop, just one below desktop res 409 | SetResolution(closestWidth, closestHeight, mode, 0); 410 | } 411 | else 412 | { 413 | ApplySelectedResolution(); 414 | } 415 | } 416 | /* 417 | else if (wasWindowed) 418 | { 419 | // reset to native/desktop resolution 420 | SetResolution(Display.main.systemWidth, Display.main.systemHeight, mode, 0); 421 | } 422 | */ 423 | else 424 | { 425 | ApplySelectedResolution(); 426 | } 427 | 428 | UpdateDialogAfterEndOfFrame(); 429 | } 430 | 431 | public void OnVSyncChanged() 432 | { 433 | if (updatingDialog) 434 | return; 435 | 436 | QualitySettings.vSyncCount = vSync.value; 437 | PlayerPrefs.SetInt(prefsKey_VSyncCount, vSync.value); 438 | UpdateDialogAfterEndOfFrame(); 439 | } 440 | 441 | public void OnQualityLevelChanged() 442 | { 443 | if (updatingDialog) 444 | return; 445 | 446 | var selectedText = quality.options[quality.value].text; 447 | QualitySettings.SetQualityLevel(new List(QualitySettings.names).IndexOf(selectedText), true); 448 | QualitySettings.vSyncCount = vSync.value; // reset vsync setting as it may be affected by quality level 449 | 450 | UpdateDialogAfterEndOfFrame(); 451 | } 452 | 453 | public void OnMonitorChanged() 454 | { 455 | if (updatingDialog) 456 | return; 457 | 458 | // currently does not attempt to auto-restart application, it merely removes the Play button (via Inspector events) thus forcing user to restart 459 | // for one, restarting would have to be coded separately for each platform 460 | // secondly, "ForceSingleInstance" would prevent a clean restart from within the running app (ie requires external app or batch file to control restart) 461 | displayNote.gameObject.SetActive(false); 462 | 463 | UpdateDialogAfterEndOfFrame(); 464 | } 465 | #endregion 466 | 467 | #region Apply Changes 468 | void ApplySelectedResolution() 469 | { 470 | // in case resolution changed, we need to check whether the Hz selection still applies for the new resolution 471 | // if not we opt to go with the default '0' Hz 472 | var selectedRes = GetSelectedResolution(); 473 | var availableRefreshRates = refreshRates[selectedRes]; 474 | var selectedHz = GetSelectedRefreshRate(); 475 | if (selectedHz.Equals("N/A") || availableRefreshRates.Contains(selectedHz) == false) 476 | selectedHz = "0"; 477 | 478 | var resolution = selectedRes.Split(new char[] { 'x' }); 479 | var width = int.Parse(resolution[0]); 480 | var height = int.Parse(resolution[1]); 481 | var hz = int.Parse(selectedHz); 482 | SetResolution(width, height, GetSelectedFullScreenMode(), hz); 483 | } 484 | 485 | void SetResolution(int width, int height, FullScreenMode mode, int hz) 486 | { 487 | // prevent setting resolution multiple times when dialog is updated in the next frame 488 | //Debug.LogError("DESIRED res: " + GetResolutionString(width, height) + " @ " + hz + " Hz in " + mode); 489 | Screen.SetResolution(width, height, mode, hz); 490 | QualitySettings.vSyncCount = vSync.value; // reset vsync setting as it may be affected by resolution 491 | } 492 | #endregion 493 | 494 | #region Update After Frame 495 | void UpdateDialogAfterEndOfFrame() 496 | { 497 | StartCoroutine(UpdateDialogAfterEndOfFrameCoroutine()); 498 | } 499 | 500 | IEnumerator UpdateDialogAfterEndOfFrameCoroutine() 501 | { 502 | // must wait for end of this AND next frame for the new resolution to be applied 503 | yield return new WaitForEndOfFrame(); 504 | yield return new WaitForEndOfFrame(); 505 | 506 | //Debug.LogError("NEW Screen: " + Screen.width+ "x" + Screen.height + " (curRes: " + Screen.currentResolution.width + "x" + Screen.currentResolution.height + 507 | // ", sysRes: " + Display.main.systemWidth + "x" + Display.main.systemHeight + ") @ " + Screen.currentResolution.refreshRate + " Hz in " + Screen.fullScreenMode); 508 | PopulateDropdowns(); 509 | ApplyCurrentSettingsToDialog(); 510 | UpdateDialogInteractability(); 511 | } 512 | #endregion 513 | } 514 | } 515 | -------------------------------------------------------------------------------- /Scripts/Controller/GraphicSettingsHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 284cae832664c984fbc5034045093061 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Controller/PopupHandler.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | #pragma warning disable 0649 4 | 5 | namespace NewResolutionDialog.Scripts.Controller 6 | { 7 | /// 8 | /// Shows the popup at Start if the is set to 9 | /// 10 | /// 11 | /// 12 | /// 13 | public class PopupHandler : MonoBehaviour 14 | { 15 | [SerializeField] 16 | private Settings settings; 17 | 18 | [SerializeField] 19 | private Canvas dialogCanvas; 20 | 21 | private void Start() 22 | { 23 | dialogCanvas.enabled = settings.dialogStyle == ResolutionDialogStyle.LaunchDialog; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Scripts/Controller/PopupHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b55cc30fc7913374c854fa34b5b88e41 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/DefaultInputsHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using NewResolutionDialog.Scripts.Controller; 3 | using UnityEngine; 4 | 5 | #pragma warning disable 0649 6 | 7 | namespace NewResolutionDialog.Scripts 8 | { 9 | /// 10 | /// 11 | /// Default input handler that provides basic support for the legacy system. 12 | /// 13 | /// 14 | /// This is used only if the is set to 15 | /// . 16 | /// 17 | /// 18 | /// When the is pressed, the popup will be shown/hidden. 19 | /// 20 | /// 21 | /// 22 | /// You can create your own Inputs Handler, notably to add support for the new InputSystem. 23 | /// In that case, remove this script from the Resolution Dialog prefab, and add your new script. 24 | /// 25 | /// 26 | public class DefaultInputsHandler : MonoBehaviour 27 | { 28 | #if ENABLE_LEGACY_INPUT_MANAGER 29 | [SerializeField] 30 | private Settings settings; 31 | 32 | [SerializeField] 33 | private Canvas dialogCanvas; 34 | 35 | [SerializeField] 36 | private KeyCode popupKeyCode = KeyCode.Escape; 37 | 38 | private void Awake() 39 | { 40 | if (settings == null) Debug.LogError($"Serialized Field {nameof(settings)} is missing!"); 41 | } 42 | 43 | private void Start() 44 | { 45 | if (settings.dialogStyle == ResolutionDialogStyle.PopupDialog) 46 | StartCoroutine(WaitForActivation()); 47 | } 48 | 49 | private IEnumerator WaitForActivation() 50 | { 51 | while (true) 52 | { 53 | yield return new WaitUntil(() => Input.GetKeyUp(popupKeyCode)); 54 | 55 | ToggleCanvas(); 56 | 57 | // wait twice (into next frame) to prevent the hotkey from being recognized again in the same frame 58 | yield return new WaitForEndOfFrame(); 59 | yield return new WaitForEndOfFrame(); 60 | } 61 | } 62 | 63 | private void ToggleCanvas() 64 | { 65 | dialogCanvas.enabled = !dialogCanvas.enabled; 66 | } 67 | 68 | #elif ENABLE_INPUT_SYSTEM 69 | private void Awake() 70 | { 71 | Debug.LogError( 72 | "The new InputSystem is not supported out of the box. " + 73 | "If you want to use the popup mode, you must create your own InputsHandler and remove this one from the prefab. " + 74 | $"Otherwise, just remove this {nameof(DefaultInputsHandler)} component for the prefab."); 75 | } 76 | #endif 77 | } 78 | } -------------------------------------------------------------------------------- /Scripts/DefaultInputsHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bc60b855fbf4f2bb81ed00e4e36f802 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Settings.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace NewResolutionDialog.Scripts 6 | { 7 | public enum ResolutionDialogStyle 8 | { 9 | /// 10 | /// Use this as a first scene. Cannot be reopened once closed. 11 | /// 12 | LaunchDialog, 13 | 14 | /// 15 | /// Use this as a popup. Open it by pressing the corresponding key. 16 | /// 17 | PopupDialog 18 | } 19 | 20 | public class Settings : MonoBehaviour 21 | { 22 | public ResolutionDialogStyle dialogStyle = ResolutionDialogStyle.LaunchDialog; 23 | } 24 | } -------------------------------------------------------------------------------- /Scripts/Settings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e9041e4ee72e564bb56fa874188b67b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Todos.md: -------------------------------------------------------------------------------- 1 | Flow: 2 | 3 | - Populate dropdown lists 4 | do not make any changes yet! 5 | - Select current item 6 | happens initially 7 | happens after a change was made at the end of a "waitforendofframe" coroutine - for changes that take effect at the end of a frame (ie resolution) 8 | base this on current settings (ie sometimes a settings gets modified from the desired setting) 9 | apply changes without raising the OnValueChanges event 10 | - Update disabled status of controls 11 | - OnValueChanged 12 | apply value 13 | reset vsync state when quality level changes (override quality level's vsync) 14 | select current item (possibly next frame) 15 | update disabled status 16 | update Hz dropdown (when one of the following changed: resolution, vsync, fullscreen mode) 17 | 18 | Side-effects: 19 | 20 | Changes to the following items may cause other items to change or become irrelevant. 21 | 22 | - Resolution affects: 23 | Refresh rate 24 | - Refresh rate affects: 25 | calculated max fps (vsync count) 26 | - Fullscreenmode affects: 27 | resolution 28 | refresh rate (disable) 29 | vsync count (disable) 30 | - Vsync count affects: 31 | refresh rate (disable) 32 | calculated max fps (vsync count) 33 | - quality affects: 34 | reset vsync count to dialog's value as it may be changed by quality level 35 | - display affects: 36 | resolution 37 | refresh rate 38 | fullscreen mode (?) 39 | 40 | TODO 41 | 42 | Tasks: 43 | - popup funktion (play = ok) 44 | - popup key einstellbar 45 | 46 | Bugs: 47 | 48 | Idee: 49 | - Tool, das ausgibt welche Resolution was ist (Display, Screen, Window, Desktop, usw.) 50 | -------------------------------------------------------------------------------- /Todos.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e3fd14e6e0f92044ae81b737fc4c241 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSmile-0000011110110111/UnityResolutionDialog/33bbea72dd495318c0358525ef4a93dff898db64/example.png -------------------------------------------------------------------------------- /example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1f0d43ebe4748d4d880c3a521bcfc43 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.sitterheim.unityresolutiondialog", 3 | "version": "1.1.0", 4 | "displayName": "Unity Resolution Dialog", 5 | "description": "Replacement for Unity's built-in resolution dialog (aka Screen Selector) that was removed in Unity 2019.3. Works both up front (simply make it the first scene) and as a popup dialog (default key: ESC). Intended for development / testing purposes but can also be used in production.", 6 | "unity": "2019.3", 7 | "author": { 8 | "name": "Steffen Itterheim", 9 | "url": "https://github.com/sitterheim" 10 | } 11 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53b4494f164a4d459adca95f90db9cdf 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------