Add -new command line arg to create a new project
This commit is contained in:
@@ -296,7 +296,7 @@ namespace FlaxEditor.Content.Settings
|
||||
}
|
||||
|
||||
// Create new settings asset and link it to the game settings
|
||||
var path = StringUtils.CombinePaths(Globals.ProjectContentFolder, CustomEditors.CustomEditorsUtil.GetPropertyNameUI(typeof(T).Name) + ".json");
|
||||
var path = StringUtils.CombinePaths(Globals.ProjectContentFolder, "Settings", CustomEditors.CustomEditorsUtil.GetPropertyNameUI(typeof(T).Name) + ".json");
|
||||
if (Editor.SaveJsonAsset(path, obj))
|
||||
return true;
|
||||
asset = FlaxEngine.Content.LoadAsync<JsonAsset>(path);
|
||||
|
||||
@@ -150,6 +150,7 @@ bool CommandLine::Parse(const Char* cmdLine)
|
||||
PARSE_BOOL_SWITCH("-clearcache ", ClearCache);
|
||||
PARSE_BOOL_SWITCH("-clearcooker ", ClearCookerCache);
|
||||
PARSE_ARG_SWITCH("-project ", Project);
|
||||
PARSE_BOOL_SWITCH("-new ", NewProject);
|
||||
PARSE_BOOL_SWITCH("-genprojectfiles ", GenProjectFiles);
|
||||
PARSE_ARG_SWITCH("-build ", Build);
|
||||
PARSE_BOOL_SWITCH("-skipcompile ", SkipCompile);
|
||||
|
||||
@@ -134,6 +134,11 @@ public:
|
||||
/// </summary>
|
||||
String Project;
|
||||
|
||||
/// <summary>
|
||||
/// -new (generates the project files inside the specified project folder or uses current workspace folder)
|
||||
/// </summary>
|
||||
Nullable<bool> NewProject;
|
||||
|
||||
/// <summary>
|
||||
/// -genprojectfiles (generates the scripts project files)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user