利用命令行启动更新程序
程序员文章站
2022-03-20 11:10:49
...
1、看代码逻辑
///
/// 命令行
///
private void ParseCommandLine()
{
string[] CommandLineArgs = Environment.GetCommandLineArgs();
#if !UNITY_EDITOR
foreach ( var item in CommandLineArgs )
{
if ( item == “–import” )
{
ImportSinglePlayerData();
}
}
#elif DATA_BASE_MERGE
ImportSinglePlayerData();
#endif
}
private void ImportSinglePlayerData()
{
string backupPath = Application.dataPath.Substring( 0, Application.dataPath.LastIndexOf( '/' ) ) + "/data_for_update/";
string tgtFilePath = Application.dataPath+ "/StreamingAssets/Upload/DrillMissionRecord";
string srcFilePath = backupPath+ "DrillMissionRecord";
}