static void PostImportFunction() { // Do nothing in batch mode string[] arguments = Environment.GetCommandLineArgs(); if (Array.IndexOf(arguments, "-nographics") != -1) { return; } EditorApplication.hierarchyWindowChanged += CheckWwiseGlobalExistance; try { if (!File.Exists(Application.dataPath + Path.DirectorySeparatorChar + WwiseSettings.WwiseSettingsFilename)) { WwiseSetupWizard.Init(); return; } else { WwiseSetupWizard.Settings = WwiseSettings.LoadSettings(); AkWwiseProjectInfo.GetData(); #if !UNITY_5 // Check if there are some new platforms to install. InstallNewPlatforms(); #else if (string.IsNullOrEmpty(AkWwiseProjectInfo.GetData().CurrentPluginConfig)) { AkWwiseProjectInfo.GetData().CurrentPluginConfig = AkPluginActivator.CONFIG_PROFILE; } AkPluginActivator.RefreshPlugins(); #endif } if (!string.IsNullOrEmpty(WwiseSetupWizard.Settings.WwiseProjectPath)) { AkWwisePicker.PopulateTreeview(); if (AkWwiseProjectInfo.GetData().autoPopulateEnabled) { AkWwiseWWUWatcher.GetInstance().StartWWUWatcher(); } } } catch (Exception e) { Debug.Log(e.ToString()); } //Check if a WwiseGlobal object exists in the current scene CheckWwiseGlobalExistance(); // If demo scene, remove file that should only be there on import string filename = Path.Combine(Path.Combine(Path.Combine(Path.Combine(Application.dataPath, "Wwise"), "Editor"), "WwiseSetupWizard"), "AkWwisePopPicker.cs"); if (File.Exists(filename)) { EditorApplication.delayCall += DeletePopPicker; } }
static void PostImportFunction() { EditorApplication.hierarchyWindowChanged += CheckWwiseGlobalExistance; if (EditorApplication.isPlayingOrWillChangePlaymode || EditorApplication.isCompiling) { return; } // Do nothing in batch mode string[] arguments = Environment.GetCommandLineArgs(); if (Array.IndexOf(arguments, "-nographics") != -1) { return; } try { if (!File.Exists(Application.dataPath + Path.DirectorySeparatorChar + WwiseSettings.WwiseSettingsFilename)) { WwiseSetupWizard.Init(); return; } else { WwiseSetupWizard.Settings = WwiseSettings.LoadSettings(); AkWwiseProjectInfo.GetData(); } if (!string.IsNullOrEmpty(WwiseSetupWizard.Settings.WwiseProjectPath)) { AkWwiseProjectInfo.Populate(); AkWwisePicker.PopulateTreeview(); if (AkWwiseProjectInfo.GetData().autoPopulateEnabled) { AkWwiseWWUBuilder.StartWWUWatcher(); } } } catch (Exception e) { Debug.Log(e.ToString()); } //Check if a WwiseGlobal object exists in the current scene CheckWwiseGlobalExistance(); // If demo scene, remove file that should only be there on import string filename = Path.Combine(Path.Combine(Path.Combine(Path.Combine(Application.dataPath, "Wwise"), "Editor"), "WwiseSetupWizard"), "AkWwisePopPicker.cs"); if (File.Exists(filename)) { EditorApplication.delayCall += DeletePopPicker; } }