using UnityEngine; using UnityEngine.EventSystems; namespace Photon.Chat.UtilityScripts { public class EventSystemSpawner : MonoBehaviour { private void OnEnable() { if (Object.FindObjectOfType() == null) { GameObject obj = new GameObject("EventSystem"); obj.AddComponent(); obj.AddComponent(); } } } }