void OnDestroy() { if (null != _backgroundProcessor) _backgroundProcessor.Stop(); _backgroundProcessor = null; }
void OnApplicationQuit() { if (null != _backgroundProcessor) _backgroundProcessor.Stop(); _backgroundProcessor = null; }
void Init() { _backgroundProcessor = new BackgroundWorldProcessor(useMultithreading && useThreadpool); // Start the background processor if (useMultithreading) _backgroundProcessor.Start(); // Start the foreground process loop StartCoroutine(Process()); }