using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; namespace KairoEngine.Core { /// /// The main script that loads all the kairoEngine modules to the game. /// This is the only required script to put on one game object to start the engine. /// public class KairoEngineManager : MonoBehaviour { private static KairoEngineManager kairoEngine; public static KairoEngineManager instance { get { if(!kairoEngine) { kairoEngine = FindObjectOfType (typeof(KairoEngineManager)) as KairoEngineManager; if(!kairoEngine) { Debug.LogError("There need to one active KairoEngine script on the scene."); return null; } } return kairoEngine; } } void Awake() { if(instance != null && instance != this) Destroy(this.gameObject); DontDestroyOnLoad(gameObject); } } }