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