UnityEngine.EventSystems.EventSystem.Update C# (CSharp) Method

Update() protected method

protected Update ( ) : void
return void
        protected virtual void Update()
        {
            if (current == this)
            {
                this.TickModules();
                bool flag = false;
                for (int i = 0; i < this.m_SystemInputModules.Count; i++)
                {
                    BaseInputModule module = this.m_SystemInputModules[i];
                    if (module.IsModuleSupported() && module.ShouldActivateModule())
                    {
                        if (this.m_CurrentInputModule != module)
                        {
                            this.ChangeEventModule(module);
                            flag = true;
                        }
                        break;
                    }
                }
                if (this.m_CurrentInputModule == null)
                {
                    for (int j = 0; j < this.m_SystemInputModules.Count; j++)
                    {
                        BaseInputModule module2 = this.m_SystemInputModules[j];
                        if (module2.IsModuleSupported())
                        {
                            this.ChangeEventModule(module2);
                            flag = true;
                            break;
                        }
                    }
                }
                if (!flag && (this.m_CurrentInputModule != null))
                {
                    this.m_CurrentInputModule.Process();
                }
            }
        }