Skip to content

Commit 9e465c7

Browse files
Update fields in editow windows
1 parent 7d9b2dc commit 9e465c7

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

unity/Editor/CreateAgentTemplate.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,43 +49,43 @@ private void OnGUI()
4949

5050
if (_enableMicButton == null) GUI.backgroundColor = Color.red;
5151

52-
_enableMicButton = (Button)EditorGUILayout.ObjectField(new GUIContent("Microphone enable Button"), _enableMicButton, typeof(Button), true);
52+
_enableMicButton = (Button)EditorGUILayout.ObjectField(new GUIContent("Microphone enable button"), _enableMicButton, typeof(Button), true);
5353

5454
GUI.backgroundColor = Color.white;
5555

5656
if (_enableMicSprite == null) GUI.backgroundColor = Color.red;
5757

58-
_enableMicSprite = (Sprite)EditorGUILayout.ObjectField(new GUIContent("Enabled microphone Sprite"), _enableMicSprite, typeof(Sprite), true);
58+
_enableMicSprite = (Sprite)EditorGUILayout.ObjectField(new GUIContent("Enabled microphone sprite"), _enableMicSprite, typeof(Sprite), true);
5959

6060
GUI.backgroundColor = Color.white;
6161

6262
if (_disableMicSprite == null) GUI.backgroundColor = Color.red;
6363

64-
_disableMicSprite = (Sprite)EditorGUILayout.ObjectField(new GUIContent("Disabled microphone Sprite"), _disableMicSprite, typeof(Sprite), true);
64+
_disableMicSprite = (Sprite)EditorGUILayout.ObjectField(new GUIContent("Disabled microphone sprite"), _disableMicSprite, typeof(Sprite), true);
6565

6666
GUI.backgroundColor = Color.white;
6767

6868
if (_responseAudioSource == null) GUI.backgroundColor = Color.red;
6969

70-
_responseAudioSource = (AudioSource)EditorGUILayout.ObjectField(new GUIContent("Response AudioSource"), _responseAudioSource, typeof(AudioSource), true);
70+
_responseAudioSource = (AudioSource)EditorGUILayout.ObjectField(new GUIContent("Response audiosource"), _responseAudioSource, typeof(AudioSource), true);
7171

7272
GUI.backgroundColor = Color.white;
7373

74-
if (GUILayout.Button("Generate Agent"))
74+
if (GUILayout.Button("Generate agent"))
7575
{
7676
if (string.IsNullOrEmpty(_modelName) || string.IsNullOrEmpty(_agentName))
7777
{
7878
LogUtils.LogError("[UnityNeuroSpeech] \"Model name\" and \"Agent name\" can't be empty!");
7979
return;
8080
}
8181

82-
if(_enableMicButton == null || _disableMicSprite == null || _enableMicSprite == null || _responseAudioSource == null)
82+
if (_enableMicButton == null || _disableMicSprite == null || _enableMicSprite == null || _responseAudioSource == null)
8383
{
8484
LogUtils.LogError("[UnityNeuroSpeech] All values in \"Agent component values\" can't be empty!");
8585
return;
8686
}
8787

88-
SafeExecutionUtils.SafeExecute("CreateAgentSettings", CreateAgentSettings);
88+
SafeExecutionUtils.SafeExecute("CreateAgentSettings", CreateAgentSettings);
8989
SafeExecutionUtils.SafeExecute("CreateAgentController", CreateAgentController);
9090
}
9191

unity/Editor/CreateSettings.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#if UNITY_EDITOR
23
using UnityNeuroSpeech.Utils;
34
using System.Collections.Generic;
@@ -74,9 +75,9 @@ private void OnGUI()
7475

7576
_isFrameworkInAnotherFolder = EditorGUILayout.Toggle(new GUIContent("Not in Assets folder", "If framework isn't in Assets directory, turn it on"), _isFrameworkInAnotherFolder);
7677

77-
if (!_isFrameworkInAnotherFolder)
78-
{
79-
GUI.enabled = false;
78+
if (!_isFrameworkInAnotherFolder)
79+
{
80+
GUI.enabled = false;
8081
GUI.backgroundColor = Color.white;
8182
}
8283

@@ -110,7 +111,7 @@ private void OnGUI()
110111
// Python
111112
EditorGUILayout.LabelField("Python", EditorStyles.boldLabel);
112113

113-
_enablePythonDebug = EditorGUILayout.Toggle(new GUIContent("Enable Python debug", "If framework isn't in Assets directory, turn it on"), _enablePythonDebug);
114+
_enablePythonDebug = EditorGUILayout.Toggle(new GUIContent("Enable Python debug", "Enables debug for local TTS Python server"), _enablePythonDebug);
114115

115116
if (string.IsNullOrEmpty(_absolutePathToMainPy)) GUI.backgroundColor = Color.red;
116117

@@ -258,4 +259,4 @@ private void OnGUI()
258259
}
259260
}
260261
}
261-
#endif
262+
#endif

unity/Editor/SceneManagerCreation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ private void OnGUI()
2525

2626
if (_microphoneDropdown == null) GUI.backgroundColor = Color.red;
2727

28-
_microphoneDropdown = (Dropdown)EditorGUILayout.ObjectField(new GUIContent("Microphone Dropdown"), _microphoneDropdown, typeof(Dropdown), true);
28+
_microphoneDropdown = (Dropdown)EditorGUILayout.ObjectField(new GUIContent("Microphone dropdown"), _microphoneDropdown, typeof(Dropdown), true);
2929

3030
GUI.backgroundColor = Color.white;
3131

3232
if (string.IsNullOrEmpty(_whisperModelPath)) GUI.backgroundColor = Color.red;
3333

34-
_whisperModelPath = EditorGUILayout.TextField(new GUIContent("Whisper Model Path", "\"Without Assets directory. For example: UnityNeuroSpeech/Whisper/ggml-medium.bin\""), _whisperModelPath);
34+
_whisperModelPath = EditorGUILayout.TextField(new GUIContent("Whisper model path", "Without \"Assets\" directory. For example: \"UnityNeuroSpeech/Whisper/ggml-medium.bin\""), _whisperModelPath);
3535

3636
GUI.backgroundColor = Color.white;
3737

0 commit comments

Comments
 (0)