Skip to content

Commit a074757

Browse files
authored
Merge pull request #110 from FairlySadPanda/master
Improve the Create Script default write location
2 parents 0d6daed + f5daf77 commit a074757

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Assets/UdonSharp/Editor/Editors/UdonSharpGUI.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,8 @@ internal static bool DrawCreateScriptButton(UdonSharpProgramAsset programAsset)
442442
if (GUILayout.Button("Create Script"))
443443
{
444444
string thisPath = AssetDatabase.GetAssetPath(programAsset);
445-
//string initialPath = Path.GetDirectoryName(thisPath);
446445
string fileName = Path.GetFileNameWithoutExtension(thisPath).Replace(" Udon C# Program Asset", "").Replace(" ", "").Replace("#", "Sharp");
447-
448-
string chosenFilePath = EditorUtility.SaveFilePanelInProject("Save UdonSharp File", fileName, "cs", "Save UdonSharp file");
446+
string chosenFilePath = EditorUtility.SaveFilePanelInProject("Save UdonSharp File", fileName, "cs", "Save UdonSharp file", Path.GetDirectoryName(thisPath));
449447

450448
if (chosenFilePath.Length > 0)
451449
{

0 commit comments

Comments
 (0)