Skip to content
Snippets Groups Projects
Select Git revision
  • 17e1661b0c9fda1aa58ad6ee866a1927a9bda7d9
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

EventsystemMode_Ctrl.cs

Blame
  • EventsystemMode_Ctrl.cs 1.70 KiB
    using UnityEngine;
    using UnityEngine.EventSystems;
    using UnityEngine.InputSystem.UI;
    using static UIconfig;
    
    public class EventsystemMode_Ctrl : MonoBehaviour
    {
        //public GameObject myself_GObj;
        //public GameObject StandaloneInputModule_GObj;
        //public GameObject InputSystem_GObj;
        public StandaloneInputModule StandaloneInputModule_script;
        public InputSystemUIInputModule InputSystem_script;
    
        private int GpMode_before = -99;
    
    
        void Start()
        {
            Update2();
        }
    
        private void Update()
        {
            /* 
            Update3();
            */
        }
    
        private void Update3()
        {
            Update2();
    
            if (GpMode_before != UIconfig.InputManagerVersion)
                EventSystemModule = InputManagerVersion;
    
            //if (GpMode_before != UIconfig.EventSystemModule)
        }
    
    
        private void Update2()
        {
            //Todo Eventbased
            switch (UIconfig.EventSystemModule)
            {
                case 0:
                    break;
    
                case 1:
                    //StandaloneInputModule_script.ActivateModule();
                    //InputSystem_script.DeactivateModule();
    
                    gameObject.GetComponent<StandaloneInputModule>().enabled = true;
                    gameObject.GetComponent<InputSystemUIInputModule>().enabled = false;
                    break;
    
                case 2:
                    //InputSystem_script.ActivateModule();
                    //StandaloneInputModule_script.DeactivateModule();
                case 3:
                default:
                    gameObject.GetComponent<StandaloneInputModule>().enabled = false;
                    gameObject.GetComponent<InputSystemUIInputModule>().enabled = true;
                    break;
            }
    
            GpMode_before = UIconfig.GameplayMode;
        }
    }