Files
2026-02-21 16:45:37 +08:00

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>();
}
}
}