public AkBankHandle(string name, bool decode, bool save) { bankName = name; bankCallback = null; decodeBank = decode; saveDecodedBank = save; // Verify if the bank has already been decoded if (decodeBank) { string DecodedBankPath = System.IO.Path.Combine(AkInitializer.GetDecodedBankFullPath(), bankName + ".bnk"); string EncodedBankPath = System.IO.Path.Combine(AkBasePathGetter.GetValidBasePath(), bankName + ".bnk"); if (System.IO.File.Exists(DecodedBankPath)) { try { if (System.IO.File.GetLastWriteTime(DecodedBankPath) > System.IO.File.GetLastWriteTime(EncodedBankPath)) { relativeBasePath = AkInitializer.GetDecodedBankFolder(); decodeBank = false; } } catch { // Assume the decoded bank exists, but is not accessible. Re-decode it anyway, so we do nothing. } } } }
public AkBankHandle(string name, bool decode, bool save) { bankName = name; bankCallback = null; decodeBank = decode; saveDecodedBank = save; #if !UNITY_EDITOR // Verify if the bank has already been decoded if (decodeBank) { if (System.IO.File.Exists(System.IO.Path.Combine(AkInitializer.GetDecodedBankFullPath(), bankName + ".bnk"))) { relativeBasePath = AkInitializer.GetDecodedBankFolder(); decodeBank = false; } } #endif }