private static Command CreateCommand_Asset_Create_Texture() { var command = new Command("texture", "Create texture asset file."); var fileArgument = new Argument("file") { Description = "Path to texture file." }; command.AddArgument(fileArgument); command.AddOption(CreateOption_KeepAssetId()); command.Handler = CommandHandler.Create <FileInfo, bool, IConsole>((file, keepAssetId, console) => { console.Out.WriteLine($"Creating texture asset file for: {file.FullName}"); var createdFile = AssetTool.CreateTextureAsset(file.FullName, keepAssetId); console.Out.WriteLine($"Texture asset file created: {createdFile}"); }); return(command); }
public string Create(string textureFilePath) => AssetTool.CreateTextureAsset(textureFilePath);