max89max e8e7f8a23a PlayerControl
Hiérarchie
Standard Assets
2015-11-07 20:56:53 +01:00

23 lines
571 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;
obj.AddComponent<TouchInputModule>();
}
}
}