using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; namespace RainbowArt.CleanFlatUI { public class InputModuleSwitch : MonoBehaviour { void Awake() { #if ENABLE_INPUT_SYSTEM StandaloneInputModule inputModule = gameObject.GetComponent(); if(inputModule) { Destroy(inputModule); } UnityEngine.InputSystem.UI.InputSystemUIInputModule newInputModule = gameObject.GetComponent(); if (newInputModule == null) { gameObject.AddComponent(); } #endif } } }