using System; using UnityEngine; using UnityEngine.Events; using UnityEngine.EventSystems; using UnityEngine.UI; namespace SC.XR.Unity.Module_Keyboard { public abstract class SCKeyboardBaseKey : MonoBehaviour, IPointerDownHandler { [SerializeField] private string m_Value; public virtual string Value { get { return m_Value; } set { m_Value = value; } } private SCKeyboardMono m_SCKeyboardMono; protected SCKeyboardMono SCKeyboardMono { get { if (m_SCKeyboardMono == null) { m_SCKeyboardMono = GetComponentInParent(); } return m_SCKeyboardMono; } } public Action OnKeyClickEvent; Button button; UnityAction call; protected virtual void Awake() { RegistKey(); } protected virtual void OnEnable() { Init(); } protected virtual void OnDisable() { } protected virtual void Start() { } protected virtual void OnDestroy() { UnRegistKey(); } public virtual void Init() { } protected virtual void RegistKey() { if (button == null) button = this.GetComponent