Change default script name to MyScript and make the name invalid if it is called Script.

This commit is contained in:
Chandler Cox
2023-05-27 11:15:54 -05:00
parent 90d633fb2d
commit c9d48d00e7

View File

@@ -45,7 +45,7 @@ namespace FlaxEditor.Content
}
/// <inheritdoc />
public override string NewItemName => "Script";
public override string NewItemName => "MyScript";
/// <inheritdoc />
public override bool CanCreate(ContentFolder targetLocation)
@@ -72,6 +72,8 @@ namespace FlaxEditor.Content
// Scripts cannot start with digit.
if (Char.IsDigit(filename[0]))
return false;
if (filename.Equals("Script"))
return false;
return true;
}