using SC.XR.Unity.Module_InputSystem; using UnityEngine.EventSystems; namespace SC.XR.Unity.Module_Keyboard { public class KeyboardManipulationHandler : PointerHandler { ManipulationHandler manipulationHandler; public override void OnPointerDown(PointerEventData eventData) { base.OnPointerDown(eventData); manipulationHandler = manipulationHandler==null?gameObject.AddComponent(): manipulationHandler; manipulationHandler.enabled = true; manipulationHandler.OnPointerDown(eventData); GameKey2Dboard gameKey2Dboard = this.GetComponentInParent(); gameKey2Dboard.OnPointerDown?.Invoke(eventData); } public override void OnPointerUp(PointerEventData eventData) { base.OnPointerUp(eventData); manipulationHandler.enabled = false; } } }