A game about forced loneliness, made by TACStudios
at master 29 lines 1.1 kB view raw
1using UnityEngine; 2using UnityEngine.EventSystems; 3 4namespace UnityEditor.EventSystems 5{ 6 public static class InputModuleComponentFactory 7 { 8 public delegate BaseInputModule AddInputModuleComponentDelegate(GameObject gameObject); 9 10 public static void SetInputModuleComponentOverride(AddInputModuleComponentDelegate addInputModuleComponentOverride) 11 { 12 m_AddInputModuleComponentOverride = addInputModuleComponentOverride; 13 } 14 15 private static AddInputModuleComponentDelegate m_AddInputModuleComponentOverride = null; 16 17 public static BaseInputModule AddInputModule(GameObject gameObject) 18 { 19 return m_AddInputModuleComponentOverride != null ? 20 m_AddInputModuleComponentOverride(gameObject) : 21 AddStandaloneInputModuleComponent(gameObject); 22 } 23 24 private static BaseInputModule AddStandaloneInputModuleComponent(GameObject gameObject) 25 { 26 return ObjectFactory.AddComponent<StandaloneInputModule>(gameObject); 27 } 28 } 29}