content/hifi-content/brosche/StudioOffice/Domain/Assets/Standard Assets/Utility/EventSystemChecker.cs
2022-02-13 21:50:01 +01:00

21 lines
542 B
C#

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.EventSystems;
public class EventSystemChecker : MonoBehaviour
{
//public GameObject eventSystem;
// Use this for initialization
void Awake ()
{
if(!FindObjectOfType<EventSystem>())
{
//Instantiate(eventSystem);
GameObject obj = new GameObject("EventSystem");
obj.AddComponent<EventSystem>();
obj.AddComponent<StandaloneInputModule>().forceModuleActive = true;
}
}
}