Files
UltimateFishing2020/Assets/Scripts/Assembly-CSharp/EventSystemChecker.cs
2026-03-04 10:03:45 +08:00

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