Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #110 from FairlySadPanda/master
Browse files Browse the repository at this point in the history
Improve the Create Script default write location
  • Loading branch information
MerlinVR authored Sep 3, 2021
2 parents 0d6daed + f5daf77 commit a074757
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Assets/UdonSharp/Editor/Editors/UdonSharpGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,8 @@ internal static bool DrawCreateScriptButton(UdonSharpProgramAsset programAsset)
if (GUILayout.Button("Create Script"))
{
string thisPath = AssetDatabase.GetAssetPath(programAsset);
//string initialPath = Path.GetDirectoryName(thisPath);
string fileName = Path.GetFileNameWithoutExtension(thisPath).Replace(" Udon C# Program Asset", "").Replace(" ", "").Replace("#", "Sharp");

string chosenFilePath = EditorUtility.SaveFilePanelInProject("Save UdonSharp File", fileName, "cs", "Save UdonSharp file");
string chosenFilePath = EditorUtility.SaveFilePanelInProject("Save UdonSharp File", fileName, "cs", "Save UdonSharp file", Path.GetDirectoryName(thisPath));

if (chosenFilePath.Length > 0)
{
Expand Down

0 comments on commit a074757

Please sign in to comment.