| | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | #if UNITY_EDITOR |
| | | string fileName = Application.dataPath + "/../BattleReport/B430_ReportBytes_" + "_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".bytes"; |
| | | try |
| | | { |
| | | if (Launch.Instance.isOpenBattleDebug) |
| | | { |
| | | File.WriteAllBytes(fileName, vBytes); |
| | | try |
| | | { |
| | | string reportFolder = Application.dataPath + "/../BattleReport/"; |
| | | |
| | | // 确保目录存在 |
| | | if (!Directory.Exists(reportFolder)) |
| | | { |
| | | Directory.CreateDirectory(reportFolder); |
| | | } |
| | | |
| | | string fileName = reportFolder + "B430_ReportBytes_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".bytes"; |
| | | File.WriteAllBytes(fileName, vBytes); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError("HB430_tagSCTurnFightReport WriteAllBytes error: " + e.Message + " fileName: " + fileName); |
| | | Debug.LogError("HB430_tagSCTurnFightReport WriteAllBytes error: " + e.Message); |
| | | } |
| | | } |
| | | #endif |
| | | |