// Token: 0x0600171F RID: 5919 RVA: 0x0007C08F File Offset: 0x0007A28F private static IEnumerator SetEventSystemOfBaseInputModulesAfterFrameDelay(EventSystem eventSystem) { yield return(null); VRTK_EventSystem.SetEventSystemOfBaseInputModules(eventSystem); yield break; }
// Token: 0x0600171B RID: 5915 RVA: 0x0007BFB8 File Offset: 0x0007A1B8 protected override void OnDisable() { base.OnDisable(); Object.Destroy(this.vrInputModule); if (this.previousEventSystem != null) { this.previousEventSystem.enabled = true; VRTK_EventSystem.CopyValuesFrom(this, this.previousEventSystem); VRTK_EventSystem.SetEventSystemOfBaseInputModules(this.previousEventSystem); } }
/// <summary> /// The RemoveEventSystem resets the Unity EventSystem back to the original state before the VRTK_VRInputModule was swapped for it. /// </summary> public virtual void RemoveEventSystem() { VRTK_EventSystem vrtkEventSystem = FindObjectOfType <VRTK_EventSystem>(); if (vrtkEventSystem == null) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_SCENE, "VRTK_UIPointer", "EventSystem")); return; } Destroy(vrtkEventSystem); }
// Token: 0x0600171A RID: 5914 RVA: 0x0007BF54 File Offset: 0x0007A154 protected override void OnEnable() { this.previousEventSystem = EventSystem.current; if (this.previousEventSystem != null) { this.previousEventSystem.enabled = false; VRTK_EventSystem.CopyValuesFrom(this.previousEventSystem, this); } this.vrInputModule = base.gameObject.AddComponent <VRTK_VRInputModule>(); base.OnEnable(); base.StartCoroutine(VRTK_EventSystem.SetEventSystemOfBaseInputModulesAfterFrameDelay(this)); }
// Token: 0x06001AD7 RID: 6871 RVA: 0x0008D30C File Offset: 0x0008B50C public virtual void RemoveEventSystem() { VRTK_EventSystem vrtk_EventSystem = Object.FindObjectOfType <VRTK_EventSystem>(); if (!vrtk_EventSystem) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_SCENE, new object[] { "VRTK_UIPointer", "EventSystem" })); return; } Object.Destroy(vrtk_EventSystem); }