void DrawDevice(Rect position, InputDevice device) { if (GUI.Button(position, device.name, Styles.deviceStyle)) { InputDeviceDebuggerWindow.Create(device); } }
public static void Create(InputDevice device) { InputDeviceDebuggerWindow window = EditorWindow.CreateInstance <InputDeviceDebuggerWindow>(); window.m_SerialNumber = device.serialNumber; window.m_TypeName = device.GetType().FullName; window.m_Device = device; window.minSize = new Vector2(270, 300); window.Show(); window.titleContent = new GUIContent(device.name); }