diff --git a/Assets/XCharts/Editor/XChartEditor.cs b/Assets/XCharts/Editor/XChartEditor.cs index 0a2a4ff0..fbfac0a8 100644 --- a/Assets/XCharts/Editor/XChartEditor.cs +++ b/Assets/XCharts/Editor/XChartEditor.cs @@ -8,6 +8,7 @@ using UnityEditor; using UnityEngine; using UnityEngine.UI; +using UnityEngine.EventSystems; namespace XCharts { @@ -28,6 +29,10 @@ namespace XCharts canvas.renderMode = RenderMode.ScreenSpaceOverlay; canvasObject.AddComponent(); canvasObject.AddComponent(); + var eventSystem = new GameObject(); + eventSystem.name = "EventSystem"; + eventSystem.AddComponent(); + eventSystem.AddComponent(); return canvas.transform; } }