Add name restriction for scripts, no digits at start.

This commit is contained in:
Jean-Baptiste Perrier
2021-05-13 17:55:15 +02:00
parent 41905f9810
commit 41447d4ba0

View File

@@ -66,6 +66,15 @@ namespace FlaxEditor.Content
return false;
}
/// <inheritdoc />
public override bool IsFileNameValid(string filename)
{
// Scripts cannot start with digit.
if (Char.IsDigit(filename[0]))
return false;
return true;
}
/// <inheritdoc />
public override void Create(string outputPath, object arg)
{