Beispiel #1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_KeyEventList = new NativeList <KeyEvent>(32, Allocator.Persistent);
            m_GuiGrabberGO = new GameObject("GUIEventGrabber");
            m_GuiGrabber   = m_GuiGrabberGO.AddComponent <HybridInputBehaviour>();
            m_GuiGrabber.m_KeyEventList = m_KeyEventList;
        }
Beispiel #2
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            m_GuiGrabber.m_KeyEventList = default;
            UnityEngine.Object.Destroy(m_GuiGrabberGO);
            m_GuiGrabberGO = null;
            m_GuiGrabber   = null;
            m_KeyEventList.Dispose();
        }