CHANGE: Make unsupported local devices appear under 'Local' node.

This commit is contained in:
Rene Damm 2018-03-23 11:11:09 -07:00
Родитель 5b42e5e5da
Коммит 960df496a4
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -8,6 +8,8 @@ using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEditor.Networking.PlayerConnection;
////TODO: split 'Local' and 'Remote' at root rather than inside subnodes
////TODO: Ideally, I'd like all separate EditorWindows opened by the InputDebugger to automatically
//// be docked into the container window of InputDebuggerWindow
@ -263,11 +265,12 @@ namespace ISX.Editor
var devices = InputSystem.devices;
devicesItem = AddChild(root, string.Format("Devices ({0})", devices.Count), ref id);
var haveRemotes = devices.Any(x => x.remote);
TreeViewItem localDevicesNode = null;
if (haveRemotes)
{
// Split local and remote devices into groups.
var localDevicesNode = AddChild(devicesItem, "Local", ref id);
localDevicesNode = AddChild(devicesItem, "Local", ref id);
AddDevices(localDevicesNode, devices, ref id);
var remoteDevicesNode = AddChild(devicesItem, "Remote", ref id);
@ -290,7 +293,8 @@ namespace ISX.Editor
InputSystem.GetUnsupportedDevices(m_UnsupportedDevices);
if (m_UnsupportedDevices.Count > 0)
{
var unsupportedDevicesNode = AddChild(devicesItem, string.Format("Unsupported ({0})", m_UnsupportedDevices.Count), ref id);
var parent = haveRemotes ? localDevicesNode : devicesItem;
var unsupportedDevicesNode = AddChild(parent, string.Format("Unsupported ({0})", m_UnsupportedDevices.Count), ref id);
foreach (var device in m_UnsupportedDevices)
AddChild(unsupportedDevicesNode, device.ToString(), ref id);
unsupportedDevicesNode.children.Sort((a, b) => string.Compare(a.displayName, b.displayName));

Просмотреть файл

@ -338,6 +338,7 @@ PlayerSettings:
m_EncodingQuality: 1
- m_BuildTarget: PS4
m_EncodingQuality: 1
m_BuildTargetGroupLightmapSettings: []
playModeTestRunnerEnabled: 1
runPlayModeTestAsEditModeTest: 0
actionOnDotNetUnhandledException: 1
@ -605,7 +606,7 @@ PlayerSettings:
platformArchitecture:
iOS: 0
scriptingBackend:
Standalone: 1
Standalone: 0
iOS: 1
il2cppCompilerConfiguration: {}
incrementalIl2cppBuild: {}