├── .gitignore ├── Assets ├── ScreenResolutionManager.meta └── ScreenResolutionManager │ ├── AspectUtility.cs │ ├── AspectUtility.cs.meta │ ├── Example.meta │ ├── Example │ ├── ResolutionSelector.cs │ ├── ResolutionSelector.cs.meta │ ├── ScreenLogger.cs │ ├── ScreenLogger.cs.meta │ ├── _Scene.unity │ └── _Scene.unity.meta │ ├── ResolutionManager.cs │ └── ResolutionManager.cs.meta └── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityAnalyticsManager.asset /.gitignore: -------------------------------------------------------------------------------- 1 | # =============== # 2 | # Unity generated # 3 | # =============== # 4 | Temp/ 5 | Library/ 6 | Builds/ 7 | UnityVS/ 8 | UnityVS.* 9 | 10 | # ===================================== # 11 | # Visual Studio / MonoDevelop generated # 12 | # ===================================== # 13 | ExportedObj/ 14 | obj/ 15 | *.svd 16 | *.userprefs 17 | *.csproj 18 | *.pidb 19 | *.suo 20 | *.sln 21 | *.user 22 | *.unityproj 23 | *.booproj 24 | 25 | # ============ # 26 | # OS generated # 27 | # ============ # 28 | .DS_Store 29 | .DS_Store? 30 | ._* 31 | .Spotlight-V100 32 | .Trashes 33 | ehthumbs.db 34 | Thumbs.db -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8863890d08f8449229841fcac2a9c277 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/AspectUtility.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class AspectUtility : MonoBehaviour 6 | { 7 | static Camera backgroundCam; 8 | static Camera staticCam; // This is the last camera where Awake is called. It is used for the static getter methods. 9 | Camera cam; 10 | 11 | void Awake() 12 | { 13 | cam = GetComponent(); 14 | 15 | if (!cam) 16 | { 17 | cam = Camera.main; 18 | } 19 | if (!cam) 20 | { 21 | Debug.LogError("No camera available"); 22 | return; 23 | } 24 | 25 | staticCam = cam; 26 | 27 | UpdateCamera (); 28 | } 29 | 30 | private void UpdateCamera() 31 | { 32 | if (!ResolutionManager.FixedAspectRatio || !cam) return; 33 | 34 | float currentAspectRatio = (float)Screen.width / Screen.height; 35 | 36 | // If the current aspect ratio is already approximately equal to the desired aspect ratio, 37 | // use a full-screen Rect (in case it was set to something else previously) 38 | if ((int)(currentAspectRatio * 100) / 100.0f == (int)(ResolutionManager.TargetAspectRatio * 100) / 100.0f) 39 | { 40 | cam.rect = new Rect(0.0f, 0.0f, 1.0f, 1.0f); 41 | if (backgroundCam) 42 | { 43 | Destroy(backgroundCam.gameObject); 44 | } 45 | return; 46 | } 47 | 48 | // Pillarbox 49 | if (currentAspectRatio > ResolutionManager.TargetAspectRatio) 50 | { 51 | float inset = 1.0f - ResolutionManager.TargetAspectRatio / currentAspectRatio; 52 | cam.rect = new Rect(inset / 2, 0.0f, 1.0f - inset, 1.0f); 53 | } 54 | // Letterbox 55 | else 56 | { 57 | float inset = 1.0f - currentAspectRatio / ResolutionManager.TargetAspectRatio; 58 | cam.rect = new Rect(0.0f, inset / 2, 1.0f, 1.0f - inset); 59 | } 60 | 61 | if (!backgroundCam) 62 | { 63 | // Make a new camera behind the normal camera which displays black; otherwise the unused space is undefined 64 | backgroundCam = new GameObject("BackgroundCam", typeof(Camera)).GetComponent(); 65 | backgroundCam.depth = int.MinValue; 66 | backgroundCam.clearFlags = CameraClearFlags.SolidColor; 67 | backgroundCam.backgroundColor = Color.black; 68 | backgroundCam.cullingMask = 0; 69 | } 70 | } 71 | 72 | public static int screenHeight 73 | { 74 | get 75 | { 76 | return (int)(Screen.height * staticCam.rect.height); 77 | } 78 | } 79 | 80 | public static int screenWidth 81 | { 82 | get 83 | { 84 | return (int)(Screen.width * staticCam.rect.width); 85 | } 86 | } 87 | 88 | public static int xOffset 89 | { 90 | get 91 | { 92 | return (int)(Screen.width * staticCam.rect.x); 93 | } 94 | } 95 | 96 | public static int yOffset 97 | { 98 | get 99 | { 100 | return (int)(Screen.height * staticCam.rect.y); 101 | } 102 | } 103 | 104 | public static Rect screenRect 105 | { 106 | get 107 | { 108 | return new Rect(staticCam.rect.x * Screen.width, staticCam.rect.y * Screen.height, staticCam.rect.width * Screen.width, staticCam.rect.height * Screen.height); 109 | } 110 | } 111 | 112 | public static Vector3 mousePosition 113 | { 114 | get 115 | { 116 | Vector3 mousePos = Input.mousePosition; 117 | mousePos.y -= (int)(staticCam.rect.y * Screen.height); 118 | mousePos.x -= (int)(staticCam.rect.x * Screen.width); 119 | return mousePos; 120 | } 121 | } 122 | 123 | public static Vector2 guiMousePosition 124 | { 125 | get 126 | { 127 | Vector2 mousePos = Event.current.mousePosition; 128 | mousePos.y = Mathf.Clamp(mousePos.y, staticCam.rect.y * Screen.height, staticCam.rect.y * Screen.height + staticCam.rect.height * Screen.height); 129 | mousePos.x = Mathf.Clamp(mousePos.x, staticCam.rect.x * Screen.width, staticCam.rect.x * Screen.width + staticCam.rect.width * Screen.width); 130 | return mousePos; 131 | } 132 | } 133 | 134 | private int lastWidth = -1, lastHeight = -1; 135 | public void Update() 136 | { 137 | if (Screen.width != lastWidth || Screen.height != lastHeight) { 138 | lastWidth = Screen.width; 139 | lastHeight = Screen.height; 140 | 141 | UpdateCamera(); 142 | } 143 | } 144 | } -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/AspectUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 522ce8019a9834b8482ef3177f924610 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2747504613e17145b7b46a621bd1abf 3 | folderAsset: yes 4 | timeCreated: 1445899650 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/ResolutionSelector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ResolutionSelector : MonoBehaviour { 5 | void OnGUI() 6 | { 7 | if (ResolutionManager.Instance == null) return; 8 | 9 | ResolutionManager resolutionManager = ResolutionManager.Instance; 10 | 11 | GUILayout.BeginArea(new Rect(20, 10, 200, Screen.height - 10)); 12 | 13 | GUILayout.Label("Select Resolution"); 14 | 15 | if (GUILayout.Button(Screen.fullScreen ? "Windowed" : "Fullscreen")) 16 | resolutionManager.ToggleFullscreen(); 17 | 18 | int i = 0; 19 | foreach (Vector2 r in Screen.fullScreen ? resolutionManager.FullscreenResolutions : resolutionManager.WindowedResolutions) 20 | { 21 | string label = r.x + "x" + r.y; 22 | if (r.x == Screen.width && r.y == Screen.height) label += "*"; 23 | if (r.x == resolutionManager.DisplayResolution.width && r.y == resolutionManager.DisplayResolution.height) label += " (native)"; 24 | 25 | if (GUILayout.Button(label)) 26 | resolutionManager.SetResolution(i, Screen.fullScreen); 27 | 28 | i++; 29 | } 30 | 31 | if (GUILayout.Button("Get Current Resolution")) 32 | { 33 | Resolution r = Screen.currentResolution; 34 | Debug.Log("Display resolution is " + r.width + "x" + r.height); 35 | } 36 | 37 | GUILayout.EndArea(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/ResolutionSelector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b835eaa7a8a562a4c921e0a55d4536cf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/ScreenLogger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class ScreenLogger : MonoBehaviour 5 | { 6 | public enum LogAnchor 7 | { 8 | TopLeft, 9 | TopRight, 10 | BottomLeft, 11 | BottomRight 12 | } 13 | 14 | public bool IsPersistent = true; 15 | public bool ShowInEditor = true; 16 | 17 | [Tooltip("Height of the log area as a percentage of the screen height")] 18 | [Range(0.3f, 1.0f)] 19 | public float Height = 0.5f; 20 | 21 | [Tooltip("Width of the log area as a percentage of the screen width")] 22 | [Range(0.3f, 1.0f)] 23 | public float Width = 0.5f; 24 | 25 | public int Margin = 20; 26 | 27 | public LogAnchor AnchorPosition = LogAnchor.BottomLeft; 28 | 29 | public int FontSize = 14; 30 | 31 | [Range(0f, 01f)] 32 | public float BackgroundOpacity = 0.5f; 33 | public Color BackgroundColor = Color.black; 34 | 35 | public bool LogMessages = true; 36 | public bool LogWarnings = true; 37 | public bool LogErrors = true; 38 | 39 | public Color MessageColor = Color.white; 40 | public Color WarningColor = Color.yellow; 41 | public Color ErrorColor = new Color(1, 0.5f, 0.5f); 42 | 43 | public bool StackTraceMessages = false; 44 | public bool StackTraceWarnings = false; 45 | public bool StackTraceErrors = true; 46 | 47 | static Queue queue = new Queue(); 48 | 49 | GUIStyle styleContainer, styleText; 50 | int padding = 5; 51 | 52 | public void Awake() 53 | { 54 | Texture2D back = new Texture2D(1, 1); 55 | BackgroundColor.a = BackgroundOpacity; 56 | back.SetPixel(0, 0, BackgroundColor); 57 | back.Apply(); 58 | 59 | styleContainer = new GUIStyle(); 60 | styleContainer.normal.background = back; 61 | styleContainer.wordWrap = true; 62 | styleContainer.padding = new RectOffset(padding, padding, padding, padding); 63 | 64 | styleText = new GUIStyle(); 65 | styleText.fontSize = FontSize; 66 | 67 | if (IsPersistent) 68 | DontDestroyOnLoad(this); 69 | } 70 | 71 | void OnEnable() 72 | { 73 | if (!ShowInEditor && Application.isEditor) return; 74 | 75 | queue = new Queue(); 76 | 77 | #if UNITY_4_5 || UNITY_4_6 78 | Application.RegisterLogCallback(HandleLog); 79 | #else 80 | Application.logMessageReceived += HandleLog; 81 | #endif 82 | } 83 | 84 | void OnDisable() 85 | { 86 | if (!ShowInEditor && Application.isEditor) return; 87 | 88 | #if UNITY_4_5 || UNITY_4_6 89 | Application.RegisterLogCallback(null); 90 | #else 91 | Application.logMessageReceived -= HandleLog; 92 | #endif 93 | } 94 | 95 | void Update() 96 | { 97 | if (!ShowInEditor && Application.isEditor) return; 98 | 99 | while (queue.Count > ((Screen.height - 2 * Margin) * Height - 2 * padding) / styleText.lineHeight) 100 | queue.Dequeue(); 101 | } 102 | 103 | void OnGUI() 104 | { 105 | if (!ShowInEditor && Application.isEditor) return; 106 | 107 | float w = (Screen.width - 2 * Margin) * Width; 108 | float h = (Screen.height - 2 * Margin) * Height; 109 | float x = 1, y = 1; 110 | 111 | switch (AnchorPosition) 112 | { 113 | case LogAnchor.BottomLeft: 114 | x = Margin; 115 | y = Margin + (Screen.height - 2 * Margin) * (1 - Height); 116 | break; 117 | 118 | case LogAnchor.BottomRight: 119 | x = Margin + (Screen.width - 2 * Margin) * (1 - Width); 120 | y = Margin + (Screen.height - 2 * Margin) * (1 - Height); 121 | break; 122 | 123 | case LogAnchor.TopLeft: 124 | x = Margin; 125 | y = Margin; 126 | break; 127 | 128 | case LogAnchor.TopRight: 129 | x = Margin + (Screen.width - 2 * Margin) * (1 - Width); 130 | y = Margin; 131 | break; 132 | } 133 | 134 | GUILayout.BeginArea(new Rect(x, y, w, h), styleContainer); 135 | 136 | foreach (LogMessage m in queue) 137 | { 138 | switch (m.Type) 139 | { 140 | case LogType.Warning: 141 | styleText.normal.textColor = WarningColor; 142 | break; 143 | 144 | case LogType.Log: 145 | styleText.normal.textColor = MessageColor; 146 | break; 147 | 148 | case LogType.Assert: 149 | case LogType.Exception: 150 | case LogType.Error: 151 | styleText.normal.textColor = ErrorColor; 152 | break; 153 | 154 | default: 155 | styleText.normal.textColor = MessageColor; 156 | break; 157 | } 158 | 159 | GUILayout.Label(m.Message, styleText); 160 | } 161 | 162 | GUILayout.EndArea(); 163 | } 164 | 165 | void HandleLog(string message, string stackTrace, LogType type) 166 | { 167 | if (type == LogType.Assert && !LogErrors) return; 168 | if (type == LogType.Error && !LogErrors) return; 169 | if (type == LogType.Exception && !LogErrors) return; 170 | if (type == LogType.Log && !LogMessages) return; 171 | if (type == LogType.Warning && !LogWarnings) return; 172 | 173 | queue.Enqueue(new LogMessage(message, type)); 174 | 175 | if (type == LogType.Assert && !StackTraceErrors) return; 176 | if (type == LogType.Error && !StackTraceErrors) return; 177 | if (type == LogType.Exception && !StackTraceErrors) return; 178 | if (type == LogType.Log && !StackTraceMessages) return; 179 | if (type == LogType.Warning && !StackTraceWarnings) return; 180 | 181 | string[] trace = stackTrace.Split(new char[] { '\n' }); 182 | 183 | foreach (string t in trace) 184 | if (t.Length != 0) queue.Enqueue(new LogMessage(" " + t, type)); 185 | } 186 | } 187 | 188 | class LogMessage 189 | { 190 | public string Message; 191 | public LogType Type; 192 | 193 | public LogMessage(string msg, LogType type) 194 | { 195 | Message = msg; 196 | Type = type; 197 | } 198 | } -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/ScreenLogger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa0afa61f775305429a6c5930482c488 3 | timeCreated: 1446157576 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/_Scene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/Assets/ScreenResolutionManager/Example/_Scene.unity -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/Example/_Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 163da320877d9104c9b5cfffcbf331ed 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/ResolutionManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using System.Linq; 6 | 7 | public class ResolutionManager : MonoBehaviour 8 | { 9 | static public ResolutionManager Instance; 10 | 11 | // Fixed aspect ratio parameters 12 | static public bool FixedAspectRatio = true; 13 | static public float TargetAspectRatio = 4 / 3f; 14 | 15 | // Windowed aspect ratio when FixedAspectRatio is false 16 | static public float WindowedAspectRatio = 4f / 3f; 17 | 18 | // List of horizontal resolutions to include 19 | int[] resolutions = new int[] { 600, 800, 1024, 1280, 1400, 1600, 1920 }; 20 | 21 | public Resolution DisplayResolution; 22 | public List WindowedResolutions, FullscreenResolutions; 23 | 24 | int currWindowedRes, currFullscreenRes; 25 | 26 | void Awake() 27 | { 28 | Instance = this; 29 | } 30 | 31 | void Start() 32 | { 33 | StartCoroutine(StartRoutine()); 34 | } 35 | 36 | private void printResolution() 37 | { 38 | Debug.Log("Current res: " + Screen.currentResolution.width + "x" + Screen.currentResolution.height); 39 | } 40 | 41 | private IEnumerator StartRoutine() 42 | { 43 | if (Application.platform == RuntimePlatform.OSXPlayer) 44 | { 45 | DisplayResolution = Screen.currentResolution; 46 | } 47 | else 48 | { 49 | if (Screen.fullScreen) 50 | { 51 | Resolution r = Screen.currentResolution; 52 | Screen.fullScreen = false; 53 | 54 | yield return null; 55 | yield return null; 56 | 57 | DisplayResolution = Screen.currentResolution; 58 | 59 | Screen.SetResolution(r.width, r.height, true); 60 | 61 | yield return null; 62 | } 63 | else 64 | { 65 | DisplayResolution = Screen.currentResolution; 66 | } 67 | } 68 | 69 | InitResolutions(); 70 | } 71 | 72 | private void InitResolutions() 73 | { 74 | float screenAspect = (float)DisplayResolution.width / DisplayResolution.height; 75 | 76 | WindowedResolutions = new List(); 77 | FullscreenResolutions = new List(); 78 | 79 | foreach (int w in resolutions) 80 | { 81 | if (w < DisplayResolution.width) 82 | { 83 | // Adding resolution only if it's 20% smaller than the screen 84 | if (w < DisplayResolution.width * 0.8f) 85 | { 86 | Vector2 windowedResolution = new Vector2(w, Mathf.Round(w / (FixedAspectRatio ? TargetAspectRatio : WindowedAspectRatio))); 87 | if (windowedResolution.y < DisplayResolution.height * 0.8f) 88 | WindowedResolutions.Add(windowedResolution); 89 | 90 | FullscreenResolutions.Add(new Vector2(w, Mathf.Round(w / screenAspect))); 91 | } 92 | } 93 | } 94 | 95 | // Adding fullscreen native resolution 96 | FullscreenResolutions.Add(new Vector2(DisplayResolution.width, DisplayResolution.height)); 97 | 98 | // Adding half fullscreen native resolution 99 | Vector2 halfNative = new Vector2(DisplayResolution.width * 0.5f, DisplayResolution.height * 0.5f); 100 | if (halfNative.x > resolutions[0] && FullscreenResolutions.IndexOf(halfNative) == -1) 101 | FullscreenResolutions.Add(halfNative); 102 | 103 | FullscreenResolutions = FullscreenResolutions.OrderBy(resolution => resolution.x).ToList(); 104 | 105 | bool found = false; 106 | 107 | if (Screen.fullScreen) 108 | { 109 | currWindowedRes = WindowedResolutions.Count - 1; 110 | 111 | for (int i = 0; i < FullscreenResolutions.Count; i++) 112 | { 113 | if (FullscreenResolutions[i].x == Screen.width && FullscreenResolutions[i].y == Screen.height) 114 | { 115 | currFullscreenRes = i; 116 | found = true; 117 | break; 118 | } 119 | } 120 | 121 | if (!found) 122 | SetResolution(FullscreenResolutions.Count - 1, true); 123 | } 124 | else 125 | { 126 | currFullscreenRes = FullscreenResolutions.Count - 1; 127 | 128 | for (int i = 0; i < WindowedResolutions.Count; i++) 129 | { 130 | if (WindowedResolutions[i].x == Screen.width && WindowedResolutions[i].y == Screen.height) 131 | { 132 | found = true; 133 | currWindowedRes = i; 134 | break; 135 | } 136 | } 137 | 138 | if (!found) 139 | SetResolution(WindowedResolutions.Count - 1, false); 140 | } 141 | } 142 | 143 | public void SetResolution(int index, bool fullscreen) 144 | { 145 | Vector2 r = new Vector2(); 146 | if (fullscreen) 147 | { 148 | currFullscreenRes = index; 149 | r = FullscreenResolutions[currFullscreenRes]; 150 | } 151 | else 152 | { 153 | currWindowedRes = index; 154 | r = WindowedResolutions[currWindowedRes]; 155 | } 156 | 157 | bool fullscreen2windowed = Screen.fullScreen & !fullscreen; 158 | 159 | Debug.Log("Setting resolution to " + (int)r.x + "x" + (int)r.y); 160 | Screen.SetResolution((int)r.x, (int)r.y, fullscreen); 161 | 162 | // On OSX the application will pass from fullscreen to windowed with an animated transition of a couple of seconds. 163 | // After this transition, the first time you exit fullscreen you have to call SetResolution again to ensure that the window is resized correctly. 164 | if (Application.platform == RuntimePlatform.OSXPlayer) 165 | { 166 | // Ensure that there is no SetResolutionAfterResize coroutine running and waiting for screen size changes 167 | StopAllCoroutines(); 168 | 169 | // Resize the window again after the end of the resize transition 170 | if (fullscreen2windowed) StartCoroutine(SetResolutionAfterResize(r)); 171 | } 172 | } 173 | 174 | private IEnumerator SetResolutionAfterResize(Vector2 r) 175 | { 176 | int maxTime = 5; // Max wait for the end of the resize transition 177 | float time = Time.time; 178 | 179 | // Skipping a couple of frames during which the screen size will change 180 | yield return null; 181 | yield return null; 182 | 183 | int lastW = Screen.width; 184 | int lastH = Screen.height; 185 | 186 | // Waiting for another screen size change at the end of the transition animation 187 | while (Time.time - time < maxTime) 188 | { 189 | if (lastW != Screen.width || lastH != Screen.height) 190 | { 191 | Debug.Log("Resize! " + Screen.width + "x" + Screen.height); 192 | 193 | Screen.SetResolution((int)r.x, (int)r.y, Screen.fullScreen); 194 | yield break; 195 | } 196 | 197 | yield return null; 198 | } 199 | 200 | Debug.Log("End waiting"); 201 | } 202 | 203 | public void ToggleFullscreen() 204 | { 205 | SetResolution( 206 | Screen.fullScreen ? currWindowedRes : currFullscreenRes, 207 | !Screen.fullScreen); 208 | } 209 | } -------------------------------------------------------------------------------- /Assets/ScreenResolutionManager/ResolutionManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0abb36f2a137ac4f956a48cdfc50c5d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.2.2f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAnalyticsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gportelli/UnityScreenResolutionManager/80f230656c56cb2bdffd5e0e9975b901165df4ff/ProjectSettings/UnityAnalyticsManager.asset --------------------------------------------------------------------------------