17 lines
414 B
C#
17 lines
414 B
C#
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class EventSystemChecker : MonoBehaviour
|
|
{
|
|
private void Awake()
|
|
{
|
|
if (!Object.FindObjectOfType<EventSystem>())
|
|
{
|
|
GameObject gameObject = new GameObject("EventSystem");
|
|
gameObject.AddComponent<EventSystem>();
|
|
gameObject.AddComponent<StandaloneInputModule>().forceModuleActive = true;
|
|
gameObject.AddComponent<TouchInputModule>();
|
|
}
|
|
}
|
|
}
|