Ejemplo n.º 1
0
        void SwapEventSystem()
        {
            if (Application.isPlaying)
            {
                Debug.LogError("Cant do this in Play mode!");
                return;
            }

            EventSystem system = FindObjectOfType <EventSystem>();

            if (!(system is CurvedUIEventSystem))
            {
                system.AddComponentIfMissing <CurvedUIEventSystem>();
                DestroyImmediate(system);
            }

            CUIeventSystemPresent = true;
        }