Skip to content

Commit db5efda

Browse files
Update CreateSettings.cs
- Fix debug for Python
1 parent 4ee188d commit db5efda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unity/Editor/CreateSettings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal sealed class CreateSettings : EditorWindow
2727
private int _requestTimeout = 30;
2828

2929
// Python debug
30-
private bool _enablePythonDebug;
30+
private bool _enablePythonDebug = true;
3131
private string _absolutePathToMainPy;
3232

3333
// Emotions
@@ -189,12 +189,14 @@ private void OnGUI()
189189
mainPyContent = mainPyContent.Replace("warnings.simplefilter(action='ignore', category=FutureWarning", "# warnings.simplefilter(action='ignore', category=FutureWarning)");
190190
mainPyContent = mainPyContent.Replace("sys.stdout = open(os.devnull, 'w')", "# sys.stdout = open(os.devnull, 'w')");
191191
mainPyContent = mainPyContent.Replace("logging.disable(logging.CRITICAL)", "# logging.disable(logging.CRITICAL)");
192+
mainPyContent = mainPyContent.Replace("# print(f\"Python executable(for gebug): {sys.executable}\")", "print(f\"Python executable(for gebug): {sys.executable}\")");
192193
}
193194
else
194195
{
195196
mainPyContent = mainPyContent.Replace("# warnings.simplefilter(action='ignore', category=FutureWarning)", "warnings.simplefilter(action='ignore', category=FutureWarning");
196197
mainPyContent = mainPyContent.Replace("# sys.stdout = open(os.devnull, 'w')", "sys.stdout = open(os.devnull, 'w')");
197198
mainPyContent = mainPyContent.Replace("# logging.disable(logging.CRITICAL)", "logging.disable(logging.CRITICAL)");
199+
mainPyContent = mainPyContent.Replace("print(f\"Python executable(for gebug): {sys.executable}\")", "# print(f\"Python executable(for gebug): {sys.executable}\")");
198200
}
199201
File.WriteAllText(_absolutePathToMainPy, mainPyContent);
200202

0 commit comments

Comments
 (0)