Beispiel #1
0
 private static void UnLoad()
 {
     if (service != null)
     {
         EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
         Object.DestroyImmediate(service);
         service = null;
     }
 }
Beispiel #2
0
        private static void Load()
        {
            if (service != null)
            {
                Debug.LogError("An instance of GhostCompilerService already exist.");
                return;
            }

            service = GhostCompilerService.LoadOrCreateService();
            service.InitializeOnLoad();
            EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
        }