private void showPrefabs() { scrollPosPrefabs = EditorGUILayout.BeginScrollView(scrollPosPrefabs, false, false); { GUILayout.Label("Available Prefabs", EditorStyles.boldLabel); GUILayout.Space(6); if (!EditorHelper.isBWFInScene) { if (!EditorHelper.isBWFInScene) { GUILayout.Label(Util.Constants.MANAGER_SCENE_OBJECT_NAME); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a '" + Util.Constants.MANAGER_SCENE_OBJECT_NAME + "'-prefab to the scene."))) { EditorHelper.InstantiatePrefab(Util.Constants.MANAGER_SCENE_OBJECT_NAME); GAApi.Event(typeof(ConfigWindow).Name, "Add " + Util.Constants.MANAGER_SCENE_OBJECT_NAME); } } } else { EditorGUILayout.HelpBox("All available prefabs are already in the scene.", MessageType.Info); } GUILayout.Space(6); } EditorGUILayout.EndScrollView(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); EditorHelper.SeparatorUI(); if (script.isActiveAndEnabled) { if (Speaker.isTTSAvailable) { GUILayout.Label("Action", EditorStyles.boldLabel); if (Util.Helper.isEditorMode) { if (GUILayout.Button(new GUIContent(" Change Gender", EditorHelper.Icon_Refresh, "Change the gender of all voices (useful for eSpeak)."))) { script.Change(); GAApi.Event(typeof(ChangeGenderEditor).Name, " Change Gender"); } } else { EditorGUILayout.HelpBox("Disabled in Play-mode!", MessageType.Info); } } else { EditorHelper.NoVoicesUI(); } } else { EditorGUILayout.HelpBox("Script is disabled!", MessageType.Info); } }
public void OnGUI() { tab = GUILayout.Toolbar(tab, new string[] { "Config", "Prefabs", "TD", "Help", "About" }); if (tab != lastTab) { lastTab = tab; GUI.FocusControl(null); } if (tab == 0) { showConfiguration(); EditorHelper.SeparatorUI(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" Save", EditorHelper.Icon_Save, "Saves the configuration settings for this project."))) { save(); GAApi.Event(typeof(ConfigWindow).Name, "Save configuration"); } if (GUILayout.Button(new GUIContent(" Reset", EditorHelper.Icon_Reset, "Resets the configuration settings for this project."))) { if (EditorUtility.DisplayDialog("Reset configuration?", "Reset the configuration of " + Util.Constants.ASSET_NAME + "?", "Yes", "No")) { Util.Config.Reset(); EditorConfig.Reset(); save(); GAApi.Event(typeof(ConfigWindow).Name, "Reset configuration"); } } } GUILayout.EndHorizontal(); GUILayout.Space(6); } else if (tab == 1) { showPrefabs(); } else if (tab == 2) { showTestDrive(); } else if (tab == 3) { showHelp(); } else { showAbout(); } }
private static void ShowInfo() { EditorUtility.DisplayDialog(Util.Constants.ASSET_NAME + " - About", "Version: " + Util.Constants.ASSET_VERSION + System.Environment.NewLine + System.Environment.NewLine + "© 2015-2017 by " + Util.Constants.ASSET_AUTHOR + System.Environment.NewLine + System.Environment.NewLine + Util.Constants.ASSET_AUTHOR_URL + System.Environment.NewLine, "Ok"); GAApi.Event(typeof(RTVoiceMenu).Name, "Info"); }
private static void PreferencesGUI() { if (cp == null) { cp = ScriptableObject.CreateInstance(typeof(ConfigPreferences)) as ConfigPreferences; } tab = GUILayout.Toolbar(tab, new string[] { "Configuration", "Help", "About" }); if (tab != lastTab) { lastTab = tab; GUI.FocusControl(null); } if (tab == 0) { cp.showConfiguration(); EditorHelper.SeparatorUI(); if (GUILayout.Button(new GUIContent(" Reset", EditorHelper.Icon_Reset, "Resets the configuration settings for this project."))) { if (EditorUtility.DisplayDialog("Reset configuration?", "Reset the configuration of " + Util.Constants.ASSET_NAME + "?", "Yes", "No")) { Util.Config.Reset(); EditorConfig.Reset(); save(); GAApi.Event(typeof(ConfigPreferences).Name, "Reset configuration"); } } GUILayout.Space(6); } else if (tab == 1) { cp.showHelp(); } else { cp.showAbout(); } if (GUI.changed) { save(); } }
static Tracer() { string lastDate = EditorPrefs.GetString(EditorConstants.KEY_TRACER_DATE); string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { GAApi.Event(typeof(Tracer).Name, "Startup"); EditorPrefs.SetString(EditorConstants.KEY_TRACER_DATE, date); } }
static ReminderCT() { #if !CT_RTV && !CT_RADIO && !CT_BWF && !CT_TR && !CT_OC && !CT_DJ && !CT_TPS && !CT_TB string lastDate = EditorPrefs.GetString(EditorConstants.KEY_CT_REMINDER_DATE); string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { int count = EditorPrefs.GetInt(EditorConstants.KEY_CT_REMINDER_COUNT) + 1; //if (count % 1 == 0) // for testing only if (count % 11 == 0 && EditorConfig.CT_REMINDER_CHECK) { int option = EditorUtility.DisplayDialogComplex(Util.Constants.ASSET_NAME + " - Our other assets", "Thank you for using '" + Util.Constants.ASSET_NAME + "'!" + System.Environment.NewLine + System.Environment.NewLine + "Please take a look at our other assets.", "Yes, show me!", "Not right now", "Don't ask again!"); if (option == 0) { Application.OpenURL(Util.Constants.ASSET_CT_URL); EditorConfig.CT_REMINDER_CHECK = false; Debug.LogWarning("+++ Thank you for visiting our assets! +++"); GAApi.Event(typeof(ReminderCT).Name, "view", "count", count); } else if (option == 1) { // do nothing! GAApi.Event(typeof(ReminderCT).Name, "later", "count", count); } else { EditorConfig.CT_REMINDER_CHECK = false; GAApi.Event(typeof(ReminderCT).Name, "never", "count", count); } EditorConfig.Save(); } EditorPrefs.SetString(EditorConstants.KEY_CT_REMINDER_DATE, date); EditorPrefs.SetInt(EditorConstants.KEY_CT_REMINDER_COUNT, count); } #endif }
static ReminderCheck() { string lastDate = EditorPrefs.GetString(EditorConstants.KEY_REMINDER_DATE); string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { int count = EditorPrefs.GetInt(EditorConstants.KEY_REMINDER_COUNT) + 1; //if (count % 1 == 0) // for testing only if (count % 13 == 0 && EditorConfig.REMINDER_CHECK) { int option = EditorUtility.DisplayDialogComplex(Util.Constants.ASSET_NAME + " - Reminder", "Please don't forget to rate " + Util.Constants.ASSET_NAME + " or even better write a little review – it would be very much appreciated!", "Yes, let's do it!", "Not right now", "Don't ask again!"); if (option == 0) { Application.OpenURL(EditorConstants.ASSET_URL); EditorConfig.REMINDER_CHECK = false; Debug.LogWarning("+++ Thank you for rating " + Util.Constants.ASSET_NAME + "! +++"); GAApi.Event(typeof(ReminderCheck).Name, "rate", "count", count); } else if (option == 1) { // do nothing! GAApi.Event(typeof(ReminderCheck).Name, "later", "count", count); } else { EditorConfig.REMINDER_CHECK = false; GAApi.Event(typeof(ReminderCheck).Name, "never", "count", count); } EditorConfig.Save(); } EditorPrefs.SetString(EditorConstants.KEY_REMINDER_DATE, date); EditorPrefs.SetInt(EditorConstants.KEY_REMINDER_COUNT, count); } }
static Tracer() { //UnityEngine.Debug.Log(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name); string lastDate = EditorPrefs.GetString(EditorConstants.KEY_TRACER_DATE); string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { GAApi.Event(typeof(Tracer).Name, "Startup"); EditorPrefs.SetString(EditorConstants.KEY_TRACER_DATE, date); } }
static Tracer() { string lastDate = string.Empty; if (Common.Util.CTPlayerPrefs.HasKey(EditorConstants.KEY_TRACER_DATE)) { lastDate = Common.Util.CTPlayerPrefs.GetString(EditorConstants.KEY_TRACER_DATE); } string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { GAApi.Event(typeof(Tracer).Name, "Startup"); Common.Util.CTPlayerPrefs.SetString(EditorConstants.KEY_TRACER_DATE, date); } }
static Telemetry() { string lastDate = string.Empty; if (Util.CTPlayerPrefs.HasKey(EditorConstants.KEY_TELEMETRY_DATE)) { lastDate = Util.CTPlayerPrefs.GetString(EditorConstants.KEY_TELEMETRY_DATE); } //string lastDate = EditorPrefs.GetString(Util.Constants.KEY_TELEMETRY_DATE); string date = System.DateTime.Now.ToString("yyyyMMdd"); // every day //string date = System.DateTime.Now.ToString("yyyyMMddHHmm"); // every minute (for tests) if (!date.Equals(lastDate)) { GAApi.Event(typeof(Telemetry).Name, "Startup"); Util.CTPlayerPrefs.SetString(EditorConstants.KEY_TELEMETRY_DATE, date); //EditorPrefs.SetString(Util.Constants.KEY_TELEMETRY_DATE, date); } }
private static void AddLoudspeaker() { EditorHelper.InstantiatePrefab("Loudspeaker"); GAApi.Event(typeof(RTVoiceGameObject).Name, "Add Loudspeaker"); }
private static void AddVoiceInitalizer() { EditorHelper.InstantiatePrefab("VoiceInitalizer"); GAApi.Event(typeof(RTVoiceGameObject).Name, "Add VoiceInitalizer"); }
private static void AddAudioFileGenerator() { EditorHelper.InstantiatePrefab("AudioFileGenerator"); GAApi.Event(typeof(RTVoiceGameObject).Name, "Add AudioFileGenerator"); }
private static void AddSpeechText() { EditorHelper.InstantiatePrefab("SpeechText"); GAApi.Event(typeof(RTVoiceGameObject).Name, "Add SpeechText"); }
public override void OnInspectorGUI() { DrawDefaultInspector(); EditorHelper.SeparatorUI(); if (script.isActiveAndEnabled) { GUILayout.Label("Stats", EditorStyles.boldLabel); GUILayout.Label("Ready:\t" + (Manager.BadWordManager.isReady ? "Yes" : "No")); if (Manager.BadWordManager.isReady) { GUILayout.Label("Sources:\t" + Manager.BadWordManager.Sources.Count); EditorHelper.SeparatorUI(); if ((script.BadWordProviderLTR != null && script.BadWordProviderLTR.Count > 0) || (script.BadWordProviderRTL != null && script.BadWordProviderRTL.Count > 0)) { GUILayout.Label("Test-Drive", EditorStyles.boldLabel); if (Util.Helper.isEditorMode) { inputText = EditorGUILayout.TextField(new GUIContent("Input Text", "Text to check."), inputText); EditorHelper.ReadOnlyTextField("Output Text", outputText); GUILayout.Space(8); GUILayout.BeginHorizontal(); if (GUILayout.Button(new GUIContent(" Contains", EditorHelper.Icon_Contains, "Contains any bad words?"))) { Manager.BadWordManager.Load(); outputText = Manager.BadWordManager.Contains(inputText).ToString(); GAApi.Event(typeof(BadWordManagerEditor).Name, "Contains"); } if (GUILayout.Button(new GUIContent(" Get", EditorHelper.Icon_Get, "Get all bad words."))) { Manager.BadWordManager.Load(); outputText = string.Join(", ", Manager.BadWordManager.GetAll(inputText).ToArray()); GAApi.Event(typeof(BadWordManagerEditor).Name, "Get"); } if (GUILayout.Button(new GUIContent(" Replace", EditorHelper.Icon_Replace, "Check and replace all bad words."))) { Manager.BadWordManager.Load(); outputText = Manager.BadWordManager.ReplaceAll(inputText); GAApi.Event(typeof(BadWordManagerEditor).Name, "Replace"); } if (GUILayout.Button(new GUIContent(" Mark", EditorHelper.Icon_Mark, "Mark all bad words."))) { Manager.BadWordManager.Load(); outputText = Manager.BadWordManager.Mark(inputText, Manager.BadWordManager.GetAll(inputText)); GAApi.Event(typeof(BadWordManagerEditor).Name, "Mark"); } GUILayout.EndHorizontal(); } else { EditorGUILayout.HelpBox("Disabled in Play-mode!", MessageType.Info); } } else { EditorGUILayout.HelpBox("Please add a Bad Word Provider!", MessageType.Warning); } } } else { EditorGUILayout.HelpBox("Script is disabled!", MessageType.Info); } }
private static void AddRTVoice() { EditorHelper.InstantiatePrefab(Util.Constants.RTVOICE_SCENE_OBJECT_NAME); GAApi.Event(typeof(RTVoiceGameObject).Name, "Add " + Util.Constants.RTVOICE_SCENE_OBJECT_NAME); }
public override void OnInspectorGUI() { DrawDefaultInspector(); EditorHelper.SeparatorUI(); if (script.isActiveAndEnabled) { if (!string.IsNullOrEmpty(script.Text)) { if (Speaker.isTTSAvailable) { GUILayout.Label("Test-Drive", EditorStyles.boldLabel); if (Util.Helper.isEditorMode) { if (Speaker.isMaryMode) { EditorGUILayout.HelpBox("Test-Drive is not supported for MaryTTS.", MessageType.Info); } else { GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" Speak", EditorHelper.Icon_Speak, "Speaks the text with the selected voice and settings."))) { script.Speak(); GAApi.Event(typeof(SpeechTextEditor).Name, "Speak"); } GUI.enabled = Speaker.isSpeaking; if (GUILayout.Button(new GUIContent(" Silence", EditorHelper.Icon_Silence, "Silence the active speaker."))) { script.Silence(); GAApi.Event(typeof(SpeechTextEditor).Name, "Silence"); } GUI.enabled = true; } GUILayout.EndHorizontal(); } EditorHelper.SeparatorUI(); GUILayout.Label("Editor", EditorStyles.boldLabel); if (GUILayout.Button(new GUIContent(" Refresh AssetDatabase", EditorHelper.Icon_Refresh, "Refresh the AssetDatabase from the Editor."))) { refreshAssetDatabase(); } } else { EditorGUILayout.HelpBox("Disabled in Play-mode!", MessageType.Info); } } else { EditorHelper.NoVoicesUI(); } } else { EditorGUILayout.HelpBox("Please enter a 'Text'!", MessageType.Warning); } } else { EditorGUILayout.HelpBox("Script is disabled!", MessageType.Info); } }
private static void ShowVideoPromo() { Application.OpenURL(Util.Constants.ASSET_VIDEO_PROMO); GAApi.Event(typeof(RTVoiceMenu).Name, "ASSET_VIDEO_PROMO"); }
// public override bool RequiresConstantRepaint() // { // return true; // } public override void OnInspectorGUI() { serializedObject.Update(); //DrawDefaultInspector(); GUILayout.Label("MaryTTS", EditorStyles.boldLabel); maryTTSMode = EditorGUILayout.BeginToggleGroup(new GUIContent("MaryTTS Mode", "Enables or disables MaryTTS (default: false)."), script.MaryTTSMode); if (maryTTSMode != script.MaryTTSMode) { serializedObject.FindProperty("MaryTTSMode").boolValue = maryTTSMode; serializedObject.ApplyModifiedProperties(); voiceIndex = 0; Speaker.ReloadProvider(); //Speaker.isMaryMode = maryTTSMode; } EditorGUI.indentLevel++; maryTTSUrl = EditorGUILayout.TextField(new GUIContent("MaryTTS URL", "Server URL for MaryTTS."), script.MaryTTSUrl); if (!maryTTSUrl.Equals(script.MaryTTSUrl)) { serializedObject.FindProperty("MaryTTSUrl").stringValue = maryTTSUrl; } maryTTSPort = EditorGUILayout.IntSlider("MaryTTS Port", script.MaryTTSPort, 0, 65535); if (maryTTSPort != script.MaryTTSPort) { serializedObject.FindProperty("MaryTTSPort").intValue = maryTTSPort; } maryTTSUser = EditorGUILayout.TextField(new GUIContent("MaryTTS User", "User name for MaryTTS (default: empty)."), script.MaryTTSUser); if (!maryTTSUser.Equals(script.MaryTTSUser)) { serializedObject.FindProperty("MaryTTSUser").stringValue = maryTTSUser; } maryTTSPassword = EditorGUILayout.PasswordField(new GUIContent("MaryTTS Password", "User password for MaryTTS (default: empty)."), script.MaryTTSPassword); if (!maryTTSPassword.Equals(script.MaryTTSPassword)) { serializedObject.FindProperty("MaryTTSPassword").stringValue = maryTTSPassword; } maryTTSType = (Model.Enum.MaryTTSType)EditorGUILayout.EnumPopup(new GUIContent("MaryTTS Type", "Input type for MaryTTS (default: MaryTTSType.RAWMARYXML)."), script.MaryTTSType); if (maryTTSType != script.MaryTTSType) { serializedObject.FindProperty("MaryTTSType").enumValueIndex = (int)maryTTSType; } EditorGUI.indentLevel--; EditorGUILayout.EndToggleGroup(); GUILayout.Space(8); GUILayout.Label("eSpeak Settings", EditorStyles.boldLabel); eSpeakMode = EditorGUILayout.Toggle(new GUIContent("eSpeak Mode", "Enable or disable eSpeak for standalone platforms (default: false)."), script.ESpeakMode); if (eSpeakMode != script.ESpeakMode) { serializedObject.FindProperty("ESpeakMode").boolValue = eSpeakMode; serializedObject.ApplyModifiedProperties(); voiceIndex = 0; Speaker.ReloadProvider(); //Speaker.isUseEspeak = useEspeak; } eSpeakModifier = (Model.Enum.ESpeakModifiers)EditorGUILayout.EnumPopup(new GUIContent("eSpeak Modifier", "Active modifier for all eSpeak voices (default: none, m1-m6 = male, f1-f4 = female)."), script.ESpeakModifier); if (eSpeakModifier != script.ESpeakModifier) { serializedObject.FindProperty("ESpeakModifier").enumValueIndex = (int)eSpeakModifier; } GUILayout.Space(8); GUILayout.Label("Advanced Settings", EditorStyles.boldLabel); autoClearTags = EditorGUILayout.Toggle(new GUIContent("Auto Clear Tags", "Automatically clear tags from speeches depending on the capabilities of the current TTS-system (default: false)."), script.AutoClearTags); if (autoClearTags != script.AutoClearTags) { serializedObject.FindProperty("AutoClearTags").boolValue = autoClearTags; } GUILayout.Space(8); GUILayout.Label("AudioClip Settings", EditorStyles.boldLabel); streamed = EditorGUILayout.Toggle(new GUIContent("Streamed", "Enable or disable streaming the audio (decrease the latency, default: false)."), script.Streamed); if (streamed != script.Streamed) { serializedObject.FindProperty("Streamed").boolValue = streamed; } compressed = EditorGUILayout.Toggle(new GUIContent("Compressed", "Enable or disable compressing the audio (needs less memory but more performance, default: false)."), script.Compressed); if (compressed != script.Compressed) { serializedObject.FindProperty("Compressed").boolValue = compressed; } if (compressed && streamed) { EditorGUILayout.HelpBox("Streamed and Compressed at the same time is not possible! Please choose one of the two possibilities.", MessageType.Warning); } GUILayout.Space(8); GUILayout.Label("Behaviour Settings", EditorStyles.boldLabel); silenceOnDisable = EditorGUILayout.Toggle(new GUIContent("Silence On Disable", "Silence any speeches if this component gets disabled (default: false)."), script.SilenceOnDisable); if (silenceOnDisable != script.SilenceOnDisable) { serializedObject.FindProperty("SilenceOnDisable").boolValue = silenceOnDisable; } silenceOnFocusLost = EditorGUILayout.Toggle(new GUIContent("Silence On Focus Lost", "Silence any speeches if the application loses the focus (default: true)."), script.SilenceOnFocustLost); if (silenceOnFocusLost != script.SilenceOnFocustLost) { serializedObject.FindProperty("SilenceOnFocustLost").boolValue = silenceOnFocusLost; } dontDestroy = EditorGUILayout.Toggle(new GUIContent("Dont Destroy", "Don't destroy gameobject during scene switches (default: true)."), script.DontDestroy); if (dontDestroy != script.DontDestroy) { serializedObject.FindProperty("DontDestroy").boolValue = dontDestroy; } EditorHelper.SeparatorUI(); if (script.isActiveAndEnabled) { GUILayout.Label("Data", EditorStyles.boldLabel); showVoices = EditorGUILayout.Foldout(showVoices, "Voices (" + Speaker.Voices.Count + ")"); if (showVoices) { EditorGUI.indentLevel++; foreach (string voice in Speaker.Voices.CTToString()) { EditorGUILayout.SelectableLabel(voice, GUILayout.Height(16), GUILayout.ExpandHeight(false)); } EditorGUI.indentLevel--; } if (GUILayout.Button(new GUIContent(" Reload", EditorHelper.Icon_Refresh, "Reload the provider."))) { Speaker.ReloadProvider(); GAApi.Event(typeof(SpeakerEditor).Name, "Reload the provider"); } EditorHelper.SeparatorUI(); if (Speaker.Voices.Count > 0) { GUILayout.Label("Test-Drive", EditorStyles.boldLabel); if (Util.Helper.isEditorMode) { if (Speaker.isMaryMode) { EditorGUILayout.HelpBox("Test-Drive is not supported for MaryTTS.", MessageType.Info); } else { voiceIndex = EditorGUILayout.Popup("Voice", voiceIndex, Speaker.Voices.CTToString().ToArray()); rate = EditorGUILayout.Slider("Rate", rate, 0f, 3f); if (Util.Helper.isWindowsPlatform) { pitch = EditorGUILayout.Slider("Pitch", pitch, 0f, 2f); volume = EditorGUILayout.Slider("Volume", volume, 0f, 1f); } GUILayout.Space(8); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" Speak", EditorHelper.Icon_Speak, "Speaks the text with the selected voice and settings."))) { Speaker.SpeakNativeInEditor("You have selected " + Speaker.Voices[voiceIndex].Name, Speaker.Voices[voiceIndex], rate, pitch, volume); GAApi.Event(typeof(SpeakerEditor).Name, "Speak"); } GUI.enabled = Speaker.isSpeaking; if (GUILayout.Button(new GUIContent(" Silence", EditorHelper.Icon_Silence, "Silence all active speakers."))) { Speaker.Silence(); GAApi.Event(typeof(SpeakerEditor).Name, "Silence"); } GUI.enabled = true; } GUILayout.EndHorizontal(); } } else { EditorGUILayout.HelpBox("Disabled in Play-mode!", MessageType.Info); } } else { EditorGUILayout.HelpBox("TTS with the current settings is not possible!", MessageType.Error); } } else { EditorGUILayout.HelpBox("Script is disabled!", MessageType.Info); } serializedObject.ApplyModifiedProperties(); }
private static void AddTextFileSpeaker() { EditorHelper.InstantiatePrefab("TextFileSpeaker"); GAApi.Event(typeof(RTVoiceMenu).Name, "Add TextFileSpeaker"); }
private static void ShowForum() { Application.OpenURL(Util.Constants.ASSET_FORUM_URL); GAApi.Event(typeof(RTVoiceMenu).Name, "ASSET_FORUM_URL"); }
protected void showAbout() { GUILayout.Label(Util.Constants.ASSET_NAME, EditorStyles.boldLabel); GUILayout.BeginHorizontal(); { GUILayout.BeginVertical(GUILayout.Width(60)); { GUILayout.Label("Version:"); GUILayout.Space(12); GUILayout.Label("Web:"); GUILayout.Space(2); GUILayout.Label("Email:"); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.Width(170)); { GUILayout.Space(0); GUILayout.Label(Util.Constants.ASSET_VERSION); GUILayout.Space(12); EditorGUILayout.SelectableLabel(Util.Constants.ASSET_AUTHOR_URL, GUILayout.Height(16), GUILayout.ExpandHeight(false)); GUILayout.Space(2); EditorGUILayout.SelectableLabel(Util.Constants.ASSET_CONTACT, GUILayout.Height(16), GUILayout.ExpandHeight(false)); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.ExpandWidth(true)); { //GUILayout.Space(0); } GUILayout.EndVertical(); GUILayout.BeginVertical(GUILayout.Width(64)); { if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Logo_Asset, "Visit asset website"))) { Application.OpenURL(EditorConstants.ASSET_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_URL"); } if (!Util.Constants.isPro) { if (GUILayout.Button(new GUIContent(" Upgrade", "Upgrade " + Util.Constants.ASSET_NAME + " to the PRO-version"))) { Application.OpenURL(Util.Constants.ASSET_PRO_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_PRO_URL"); } } } GUILayout.EndVertical(); } GUILayout.EndHorizontal(); GUILayout.Label("© 2015-2017 by " + Util.Constants.ASSET_AUTHOR); EditorHelper.SeparatorUI(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" AssetStore", EditorHelper.Logo_Unity, "Visit the 'Unity AssetStore' website."))) { Application.OpenURL(Util.Constants.ASSET_CT_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_CT_URL"); } if (GUILayout.Button(new GUIContent(" " + Util.Constants.ASSET_AUTHOR, EditorHelper.Logo_CT, "Visit the '" + Util.Constants.ASSET_AUTHOR + "' website."))) { Application.OpenURL(Util.Constants.ASSET_AUTHOR_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_AUTHOR_URL"); } } GUILayout.EndHorizontal(); EditorHelper.SeparatorUI(); aboutTab = GUILayout.Toolbar(aboutTab, new string[] { "Readme", "Versions", "SSML", "EML", "Update" }); if (aboutTab == 4) { scrollPosAboutUpdate = EditorGUILayout.BeginScrollView(scrollPosAboutUpdate, false, false); { Color fgColor = GUI.color; GUI.color = Color.yellow; if (updateStatus == UpdateStatus.NO_UPDATE) { GUI.color = Color.green; GUILayout.Label(updateText); } else if (updateStatus == UpdateStatus.UPDATE) { GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent(" Download", "Visit the 'Unity AssetStore' to download the latest version."))) { Application.OpenURL(EditorConstants.ASSET_URL); GAApi.Event(typeof(ConfigBase).Name, "UPDATE"); } } else if (updateStatus == UpdateStatus.UPDATE_PRO) { GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent(" Upgrade", "Upgrade to the PRO-version in the 'Unity AssetStore'."))) { Application.OpenURL(Util.Constants.ASSET_PRO_URL); GAApi.Event(typeof(ConfigBase).Name, "UPGRADE PRO"); } } else if (updateStatus == UpdateStatus.UPDATE_VERSION) { GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent(" Upgrade", "Upgrade to the newer version in the 'Unity AssetStore'"))) { Application.OpenURL(Util.Constants.ASSET_CT_URL); GAApi.Event(typeof(ConfigBase).Name, "UPGRADE"); } } else if (updateStatus == UpdateStatus.DEPRECATED) { GUILayout.Label(updateText); if (GUILayout.Button(new GUIContent(" More Information", "Visit the 'crosstales'-site for more information."))) { Application.OpenURL(Util.Constants.ASSET_AUTHOR_URL); GAApi.Event(typeof(ConfigBase).Name, "DEPRECATED"); } } else { GUI.color = Color.cyan; GUILayout.Label(updateText); } GUI.color = fgColor; } EditorGUILayout.EndScrollView(); if (updateStatus == UpdateStatus.NOT_CHECKED || updateStatus == UpdateStatus.NO_UPDATE) { bool isChecking = !(worker == null || (worker != null && !worker.IsAlive)); GUI.enabled = Util.Helper.isInternetAvailable && !isChecking; if (GUILayout.Button(new GUIContent(isChecking ? "Checking... Please wait." : " Check For Update", EditorHelper.Icon_Check, "Checks for available updates of " + Util.Constants.ASSET_NAME))) { worker = new System.Threading.Thread(() => UpdateCheck.UpdateCheckForEditor(out updateText, out updateStatus)); worker.Start(); GAApi.Event(typeof(ConfigBase).Name, "UpdateCheck"); } GUI.enabled = true; } } else if (aboutTab == 0) { if (readme == null) { string path = Application.dataPath + EditorConfig.ASSET_PATH + "README.txt"; try { readme = System.IO.File.ReadAllText(path); } catch (System.Exception) { readme = "README not found: " + path; } } scrollPosAboutReadme = EditorGUILayout.BeginScrollView(scrollPosAboutReadme, false, false); { GUILayout.Label(readme); } EditorGUILayout.EndScrollView(); } else if (aboutTab == 1) { if (versions == null) { string path = Application.dataPath + EditorConfig.ASSET_PATH + "Documentation/VERSIONS.txt"; try { versions = System.IO.File.ReadAllText(path); } catch (System.Exception) { versions = "VERSIONS not found: " + path; } } scrollPosAboutVersions = EditorGUILayout.BeginScrollView(scrollPosAboutVersions, false, false); { GUILayout.Label(versions); } EditorGUILayout.EndScrollView(); } else if (aboutTab == 2) { if (ssml == null) { string path = Application.dataPath + EditorConfig.ASSET_PATH + "Documentation/SSML.txt"; try { ssml = System.IO.File.ReadAllText(path); } catch (System.Exception) { ssml = "SSML not found: " + path; } } scrollPosAboutVersions = EditorGUILayout.BeginScrollView(scrollPosAboutVersions, false, false); { GUILayout.Label(ssml); } EditorGUILayout.EndScrollView(); } else { if (emotionml == null) { string path = Application.dataPath + EditorConfig.ASSET_PATH + "Documentation/EMOTIONML.txt"; try { emotionml = System.IO.File.ReadAllText(path); } catch (System.Exception) { emotionml = "EmotionML not found: " + path; } } scrollPosAboutVersions = EditorGUILayout.BeginScrollView(scrollPosAboutVersions, false, false); { GUILayout.Label(emotionml); } EditorGUILayout.EndScrollView(); } EditorHelper.SeparatorUI(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Social_Facebook, "Follow us on 'Facebook'."))) { Application.OpenURL(Util.Constants.ASSET_SOCIAL_FACEBOOK); GAApi.Event(typeof(ConfigBase).Name, "ASSET_SOCIAL_FACEBOOK"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Social_Twitter, "Follow us on 'Twitter'."))) { Application.OpenURL(Util.Constants.ASSET_SOCIAL_TWITTER); GAApi.Event(typeof(ConfigBase).Name, "ASSET_SOCIAL_TWITTER"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Social_Linkedin, "Follow us on 'LinkedIn'."))) { Application.OpenURL(Util.Constants.ASSET_SOCIAL_LINKEDIN); GAApi.Event(typeof(ConfigBase).Name, "ASSET_SOCIAL_LINKEDIN"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Social_Xing, "Follow us on 'XING'."))) { Application.OpenURL(Util.Constants.ASSET_SOCIAL_XING); GAApi.Event(typeof(ConfigBase).Name, "ASSET_SOCIAL_XING"); } } GUILayout.EndHorizontal(); GUILayout.Space(6); }
private void showTestDrive() { if (Util.Helper.isEditorMode) { if (Speaker.Voices.Count > 0) { scrollPosTD = EditorGUILayout.BeginScrollView(scrollPosTD, false, false); { GUILayout.Label("Test-Drive", EditorStyles.boldLabel); if (Speaker.isMaryMode) { EditorGUILayout.HelpBox("Test-Drive is not supported for MaryTTS.", MessageType.Info); } else { text = EditorGUILayout.TextField("Text: ", text); voiceIndex = EditorGUILayout.Popup("Voice", voiceIndex, Speaker.Voices.CTToString().ToArray()); rate = EditorGUILayout.Slider("Rate", rate, 0f, 3f); if (Util.Helper.isWindowsPlatform) { pitch = EditorGUILayout.Slider("Pitch", pitch, 0f, 2f); volume = EditorGUILayout.Slider("Volume", volume, 0f, 1f); } } } EditorGUILayout.EndScrollView(); EditorHelper.SeparatorUI(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" Speak", EditorHelper.Icon_Speak, "Speaks the text with the selected voice and settings."))) { Speaker.SpeakNativeInEditor(text, Speaker.Voices[voiceIndex], rate, pitch, volume); silenced = false; GAApi.Event(typeof(ConfigWindow).Name, "Speak"); } GUI.enabled = Speaker.isSpeaking; if (GUILayout.Button(new GUIContent(" Silence", EditorHelper.Icon_Silence, "Silence all active speakers."))) { silence(); GAApi.Event(typeof(ConfigWindow).Name, "Silence"); } GUI.enabled = true; } GUILayout.EndHorizontal(); GUILayout.Space(6); } else { EditorHelper.NoVoicesUI(); } } else { EditorGUILayout.HelpBox("Disabled in Play-mode!", MessageType.Info); } }
private void showPrefabs() { scrollPosPrefabs = EditorGUILayout.BeginScrollView(scrollPosPrefabs, false, false); { //GUILayout.Space(8); GUILayout.Label("Available Prefabs", EditorStyles.boldLabel); GUILayout.Space(6); //EditorHelper.SeparatorUI (6); if (!EditorHelper.isRTVoiceInScene) { GUILayout.Label(Util.Constants.RTVOICE_SCENE_OBJECT_NAME); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a '" + Util.Constants.RTVOICE_SCENE_OBJECT_NAME + "'-prefab to the scene."))) { EditorHelper.InstantiatePrefab(Util.Constants.RTVOICE_SCENE_OBJECT_NAME); GAApi.Event(typeof(ConfigWindow).Name, "Add " + Util.Constants.RTVOICE_SCENE_OBJECT_NAME); } EditorHelper.SeparatorUI(); } GUILayout.Label("AudioFileGenerator"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'AudioFileGenerator'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("AudioFileGenerator"); GAApi.Event(typeof(ConfigWindow).Name, "Add AudioFileGenerator"); } GUILayout.Space(6); GUILayout.Label("SpeechText"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'SpeechText'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("SpeechText"); GAApi.Event(typeof(ConfigWindow).Name, "Add SpeechText"); } GUILayout.Space(6); GUILayout.Label("Sequencer"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'Sequencer'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("Sequencer"); GAApi.Event(typeof(ConfigWindow).Name, "Add Sequencer"); } GUILayout.Space(6); GUILayout.Label("TextFileSpeaker"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'TextFileSpeaker'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("TextFileSpeaker"); GAApi.Event(typeof(ConfigWindow).Name, "Add TextFileSpeaker"); } EditorHelper.SeparatorUI(); GUILayout.Label("Loudspeaker"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'Loudspeaker'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("Loudspeaker"); GAApi.Event(typeof(ConfigWindow).Name, "Add Loudspeaker"); } EditorHelper.SeparatorUI(); GUILayout.Label("VoiceInitalizer"); if (GUILayout.Button(new GUIContent(" Add", EditorHelper.Icon_Plus, "Adds a 'VoiceInitalizer'-prefab to the scene."))) { EditorHelper.InstantiatePrefab("VoiceInitalizer"); GAApi.Event(typeof(ConfigWindow).Name, "Add VoiceInitalizer"); } GUILayout.Space(6); } EditorGUILayout.EndScrollView(); }
private static void AddRadioPlayer() { EditorHelper.InstantiatePrefab(Util.Constants.MANAGER_SCENE_OBJECT_NAME); GAApi.Event(typeof(BWFGameObject).Name, "Add " + Util.Constants.MANAGER_SCENE_OBJECT_NAME); }
private static void AddSequencer() { EditorHelper.InstantiatePrefab("Sequencer"); GAApi.Event(typeof(RTVoiceMenu).Name, "Add Sequencer"); }
private static void ShowManual() { Application.OpenURL(Util.Constants.ASSET_MANUAL_URL); GAApi.Event(typeof(RTVoiceMenu).Name, "ASSET_MANUAL_URL"); }
protected void showHelp() { scrollPosHelp = EditorGUILayout.BeginScrollView(scrollPosHelp, false, false); { GUILayout.Label("Resources", EditorStyles.boldLabel); //GUILayout.Space(8); GUILayout.BeginHorizontal(); { GUILayout.BeginVertical(); { if (GUILayout.Button(new GUIContent(" Manual", EditorHelper.Icon_Manual, "Show the manual."))) { Application.OpenURL(Util.Constants.ASSET_MANUAL_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_MANUAL_URL"); } GUILayout.Space(6); if (GUILayout.Button(new GUIContent(" Forum", EditorHelper.Icon_Forum, "Visit the forum page."))) { Application.OpenURL(Util.Constants.ASSET_FORUM_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_FORUM_URL"); } } GUILayout.EndVertical(); GUILayout.BeginVertical(); { if (GUILayout.Button(new GUIContent(" API", EditorHelper.Icon_API, "Show the API."))) { Application.OpenURL(Util.Constants.ASSET_API_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_API_URL"); } GUILayout.Space(6); if (GUILayout.Button(new GUIContent(" Product", EditorHelper.Icon_Product, "Visit the product page."))) { Application.OpenURL(Util.Constants.ASSET_WEB_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_WEB_URL"); } } GUILayout.EndVertical(); } GUILayout.EndHorizontal(); EditorHelper.SeparatorUI(); GUILayout.Label("Videos", EditorStyles.boldLabel); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(" Promo", EditorHelper.Video_Promo, "View the promotion video on 'Youtube'."))) { Application.OpenURL(Util.Constants.ASSET_VIDEO_PROMO); GAApi.Event(typeof(ConfigBase).Name, "ASSET_VIDEO_PROMO"); } if (GUILayout.Button(new GUIContent(" Tutorial", EditorHelper.Video_Tutorial, "View the tutorial video on 'Youtube'."))) { Application.OpenURL(Util.Constants.ASSET_VIDEO_TUTORIAL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_VIDEO_TUTORIAL"); } } GUILayout.EndHorizontal(); GUILayout.Space(6); if (GUILayout.Button(new GUIContent(" All Videos", EditorHelper.Icon_Videos, "Visit our 'Youtube'-channel for more videos."))) { Application.OpenURL(Util.Constants.ASSET_SOCIAL_YOUTUBE); GAApi.Event(typeof(ConfigBase).Name, "ASSET_SOCIAL_YOUTUBE"); } EditorHelper.SeparatorUI(); GUILayout.Label("3rd Party Assets", EditorStyles.boldLabel); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_PlayMaker, "More information about 'PlayMaker'."))) { Application.OpenURL(Util.Constants.ASSET_3P_PLAYMAKER); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_PLAYMAKER"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_AdventureCreator, "More information about 'Adventure Creator'."))) { Application.OpenURL(Util.Constants.ASSET_3P_ADVENTURE_CREATOR); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_ADVENTURE_CREATOR"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_CinemaDirector, "More information about 'Cinema Director'."))) { Application.OpenURL(Util.Constants.ASSET_3P_CINEMA_DIRECTOR); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_CINEMA_DIRECTOR"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_DialogueSystem, "More information about 'Dialogue System'."))) { Application.OpenURL(Util.Constants.ASSET_3P_DIALOG_SYSTEM); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_DIALOG_SYSTEM"); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_LDC, "More information about 'Localized Dialogs'."))) { Application.OpenURL(Util.Constants.ASSET_3P_LOCALIZED_DIALOGS); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_LOCALIZED_DIALOGS"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_LipSync, "More information about 'LipSync'."))) { Application.OpenURL(Util.Constants.ASSET_3P_LIPSYNC); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_LIPSYNC"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_NPC_Chat, "More information about 'NPC Chat'."))) { Application.OpenURL(Util.Constants.ASSET_3P_NPC_CHAT); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_NPC_CHAT"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_QuestSystem, "More information about 'Quest System'."))) { Application.OpenURL(Util.Constants.ASSET_3P_QUEST_SYSTEM); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_QUEST_SYSTEM"); } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); { if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_SALSA, "More information about 'SALSA'."))) { Application.OpenURL(Util.Constants.ASSET_3P_SALSA); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_SALSA"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_SLATE, "More information about 'SLATE'."))) { Application.OpenURL(Util.Constants.ASSET_3P_SLATE); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_SLATE"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_THE_Dialogue_Engine, "More information about 'THE Dialogue Engine'."))) { Application.OpenURL(Util.Constants.ASSET_3P_DIALOGUE_ENGINE); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_DIALOGUE_ENGINE"); } if (GUILayout.Button(new GUIContent(string.Empty, EditorHelper.Store_uSequencer, "More information about 'uSequencer'."))) { Application.OpenURL(Util.Constants.ASSET_3P_USEQUENCER); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_USEQUENCER"); } } GUILayout.EndHorizontal(); GUILayout.Space(6); if (GUILayout.Button(new GUIContent(" All Supported Assets", EditorHelper.Icon_3p_Assets, "More information about the all supported assets."))) { Application.OpenURL(Util.Constants.ASSET_3P_URL); GAApi.Event(typeof(ConfigBase).Name, "ASSET_3P_URL"); } } EditorGUILayout.EndScrollView(); GUILayout.Space(6); }
private static void ShowProduct() { Application.OpenURL(Util.Constants.ASSET_WEB_URL); GAApi.Event(typeof(RTVoiceMenu).Name, "ASSET_WEB_URL"); }