Beispiel #1
0
        void Start()
        {
            ModalManager            manager = ModalManager.hidden_instance;
            ModalMenuInput <Result> data    = manager.ExtractData <Result>(this);

            if (data == null)
            {
                data = DefaultInput();
                manager.StartWithGameplay(data, this);
            }
            UnityEngine.EventSystems.EventSystem.current.SetSelectedGameObject(m_initialSelectable.gameObject);
            Initialize(data as Input);
            m_yield = data.yielder;
            m_id    = data.id;
        }
Beispiel #2
0
        void Start()
        {
            m_canvas = GetComponent <Canvas>();
            ModalManager            manager = ModalManager.hidden_instance;
            ModalMenuInput <Result> data    = manager.ExtractData <Result>();

            if (data == null)
            {
                data = DefaultInput();
            }
            m_canvas.sortingOrder = manager.GetCurrentSortingLayer();
            if (UnityEngine.EventSystems.EventSystem.current == null)
            {
                GameObject ev = new GameObject("tmp_EventSystem");
                ev.AddComponent <UnityEngine.EventSystems.EventSystem>();
            }
            UnityEngine.EventSystems.EventSystem.current.SetSelectedGameObject(m_initialSelectable.gameObject);
            Initialize(data as Input);
            m_yield = data.yielder;
            m_id    = data.id;
        }