static public void Start(GameObject context, Action onReady = null, bool bEditor = false) { JsonUtil.InitJson(); GameObject.DontDestroyOnLoad(context); if (context.GetComponent <AudioListener>() == null) { context.AddComponent <AudioListener>(); } _mSystem = context.AddComponent <GOERoot>(); _mSystem._mbEditor = bEditor; _mSystem._context = context; _mSystem._onEngineReady += onReady; _mSystem.Init(); }
void OnDestory() { _mSystem.Destroy(); _mSystem = null; }