예제 #1
0
        private static Command CreateCommand_Asset_Create_Sound()
        {
            var command      = new Command("sound", "Create sound asset file.");
            var fileArgument = new Argument("file")
            {
                Description = "Path to sound file."
            };

            command.AddArgument(fileArgument);
            command.AddOption(CreateOption_KeepAssetId());
            command.Handler = CommandHandler.Create <FileInfo, bool, IConsole>((file, keepAssetId, console) =>
            {
                console.Out.WriteLine($"Creating sound asset file for: {file.FullName}");
                var createdFile = AssetTool.CreateSoundAsset(file.FullName, keepAssetId);
                console.Out.WriteLine($"Sound asset file created: {createdFile}");
            });

            return(command);
        }
예제 #2
0
 public string Create(string soundFilePath) => AssetTool.CreateSoundAsset(soundFilePath);