diff --git a/Source/Assets/TouchScript/Editor/TouchManagerEditor.cs b/Source/Assets/TouchScript/Editor/TouchManagerEditor.cs index b5486f592..5065baf83 100644 --- a/Source/Assets/TouchScript/Editor/TouchManagerEditor.cs +++ b/Source/Assets/TouchScript/Editor/TouchManagerEditor.cs @@ -207,7 +207,11 @@ private void drawSendMessage() var label = EditorGUI.BeginProperty(r, TEXT_SEND_MESSAGE_EVENTS, sendMessageEvents); EditorGUI.BeginChangeCheck(); r = EditorGUI.PrefixLabel(r, label); +#if UNITY_2017_3_OR_NEWER + var sMask = (TouchManager.MessageType) EditorGUI.EnumFlagsField(r, instance.SendMessageEvents); +#else var sMask = (TouchManager.MessageType) EditorGUI.EnumMaskField(r, instance.SendMessageEvents); +#endif if (EditorGUI.EndChangeCheck()) { instance.SendMessageEvents = sMask; diff --git a/Source/Assets/TouchScript/Editor/TouchScriptSettingsWindow.cs b/Source/Assets/TouchScript/Editor/TouchScriptSettingsWindow.cs index 8645a087b..be9098cc6 100644 --- a/Source/Assets/TouchScript/Editor/TouchScriptSettingsWindow.cs +++ b/Source/Assets/TouchScript/Editor/TouchScriptSettingsWindow.cs @@ -139,7 +139,7 @@ private void drawListElement(string header, string content, string url) { var rect = GUILayoutUtility.GetLastRect(); EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link); - if (Event.current.type == EventType.mouseDown && rect.Contains(Event.current.mousePosition)) + if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition)) Application.OpenURL(url); } } diff --git a/Source/Assets/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs b/Source/Assets/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs index 892dd2397..cd643ca71 100644 --- a/Source/Assets/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs +++ b/Source/Assets/TouchScript/Scripts/Devices/Display/GenericDisplayDevice.cs @@ -76,7 +76,9 @@ private void updateNativeResulotion() // Mobiles / fullscreen case RuntimePlatform.Android: case RuntimePlatform.IPhonePlayer: +#if !UNITY_2018_2_OR_NEWER case RuntimePlatform.TizenPlayer: +#endif case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: @@ -102,11 +104,15 @@ private void updateNativeResulotion() nativeResolution = new Vector2(res.width, res.height); break; // Probably TVs +#if !UNITY_2017_3_OR_NEWER case RuntimePlatform.SamsungTVPlayer: +#endif #if UNITY_5_6_OR_NEWER case RuntimePlatform.Switch: #endif +#if !UNITY_2018_1_OR_NEWER case RuntimePlatform.WiiU: +#endif case RuntimePlatform.XboxOne: case RuntimePlatform.tvOS: // This has not been tested and is probably wrong. @@ -114,9 +120,11 @@ private void updateNativeResulotion() res = Screen.currentResolution; nativeResolution = new Vector2(res.width, res.height); break; +#if !UNITY_2018_3_OR_NEWER case RuntimePlatform.PSP2: nativeResolution = new Vector2(960, 544); break; +#endif default: // This has not been tested and is probably wrong. if (getHighestResolution(out nativeResolution)) break; @@ -192,18 +200,24 @@ private void updateNativeDPI() // Mobiles / fullscreen case RuntimePlatform.Android: case RuntimePlatform.IPhonePlayer: +#if !UNITY_2018_2_OR_NEWER case RuntimePlatform.TizenPlayer: +#endif case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: // We just hope that mobiles report their DPI correctly break; // Probably TVs +#if !UNITY_2017_3_OR_NEWER case RuntimePlatform.SamsungTVPlayer: +#endif #if UNITY_5_6_OR_NEWER case RuntimePlatform.Switch: #endif +#if !UNITY_2018_1_OR_NEWER case RuntimePlatform.WiiU: +#endif case RuntimePlatform.XboxOne: case RuntimePlatform.tvOS: // This has not been tested and is probably wrong. @@ -220,9 +234,11 @@ private void updateNativeDPI() nativeDPI = 40; } break; +#if !UNITY_2018_3_OR_NEWER case RuntimePlatform.PSP2: nativeDPI = 220.68f; break; +#endif default: // This has not been tested and is probably wrong. nativeDPI = 160;