Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Source/Assets/TouchScript/Editor/TouchManagerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -102,21 +104,27 @@ 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.
if (getHighestResolution(out nativeResolution)) break;
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;
Expand Down Expand Up @@ -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.
Expand All @@ -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;
Expand Down