Updated Editor create options to add the correct Event System Input module for the Input system used, now or old.
Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/378pull/413/head
parent
1853ad7e89
commit
2c5a7bb47f
|
@ -1,9 +1,17 @@
|
|||
using TMPro;
|
||||
#if UNITY_2019_1_OR_NEWER && !ENABLE_LEGACY_INPUT_MANAGER
|
||||
#define NEW_INPUT_SYSTEM
|
||||
#endif
|
||||
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.UI.Extensions;
|
||||
|
||||
#if NEW_INPUT_SYSTEM
|
||||
using UnityEngine.InputSystem.UI;
|
||||
#endif
|
||||
|
||||
namespace UnityEditor.UI
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -157,7 +165,11 @@ namespace UnityEditor.UI
|
|||
var eventSystem = new GameObject("EventSystem");
|
||||
GameObjectUtility.SetParentAndAlign(eventSystem, parent);
|
||||
esys = eventSystem.AddComponent<EventSystem>();
|
||||
#if NEW_INPUT_SYSTEM
|
||||
eventSystem.AddComponent<InputSystemUIInputModule>();
|
||||
#else
|
||||
eventSystem.AddComponent<StandaloneInputModule>();
|
||||
#endif
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(eventSystem, "Create " + eventSystem.name);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"GUID:343deaaf83e0cee4ca978e7df0b80d21",
|
||||
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
|
||||
"GUID:cf414061cae3a954baf92763590f3127",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
|
|
Loading…
Reference in New Issue