diff --git a/com.dotsui.core/CHANGELOG.md b/com.dotsui.core/CHANGELOG.md index 6700d61..2022dfd 100644 --- a/com.dotsui.core/CHANGELOG.md +++ b/com.dotsui.core/CHANGELOG.md @@ -2,6 +2,19 @@ **This file contains changelog for all DotsUI packages** +## [0.5.0] 2019-12-15 + +### Added + +* Toggle control + + +### Changes + +* Refactored input system (significant performance improvement) +* Implemented dedicated parent system. It works with the same components, but write group prevents some Unity.Transforms systems from querying entities with RectTransfrom. This way we can remove some unnecessary components (like LocalToWorld and LocalToParent) and see a great performance boost. + + ## [0.4.0] 2019-09-11 ### Added diff --git a/com.dotsui.core/DotsUI.Controls/ButtonSystem.cs b/com.dotsui.core/DotsUI.Controls/ButtonSystem.cs index 8ddaa0a..1226e6f 100644 --- a/com.dotsui.core/DotsUI.Controls/ButtonSystem.cs +++ b/com.dotsui.core/DotsUI.Controls/ButtonSystem.cs @@ -1,4 +1,5 @@ -using DotsUI.Core; +using System.Diagnostics; +using DotsUI.Core; using DotsUI.Core.Utils; using DotsUI.Input; using Unity.Entities; @@ -9,72 +10,39 @@ namespace DotsUI.Controls { [UpdateInGroup(typeof(InputSystemGroup))] - [UpdateAfter(typeof(ControlsInputSystem))] + [UpdateAfter(typeof(ControlsInputSystemGroup))] public class ButtonSystem : JobComponentSystem { - private EntityQuery m_EventGroup; private InputHandleBarrier m_Barrier; + private PointerEventQuery m_PointerQuery; + protected override void OnCreate() { m_Barrier = World.GetOrCreateSystem(); - m_EventGroup = GetEntityQuery(new EntityQueryDesc() - { - All = new[] - { - ComponentType.ReadWrite(), - ComponentType.ReadWrite() - } - }); + GetEntityQuery(ComponentType.ReadOnly