Пример #1
0
 public static string CheckReplaceFile(string oriFileName)
 {
     if ((instance != null) && ((instance.replaceCfgNames != null) && instance.replaceCfgMap.ContainsKey(oriFileName)))
     {
         ReplaceCfgItem item = instance.replaceCfgMap[oriFileName];
         Debug.Log("replaceFile : " + item.oriFileName + " to " + item.replacedFileName);
         return(item.replacedFileName);
     }
     return(oriFileName);
 }
Пример #2
0
 private void Awake()
 {
     UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
     encrypt  = this.Encrypt;
     instance = this;
     if (this.replaceCfgNames != null)
     {
         int count = this.replaceCfgNames.Count;
         for (int i = 0; i < count; i++)
         {
             ReplaceCfgItem item = this.replaceCfgNames[i];
             if ((!string.IsNullOrEmpty(item.oriFileName) && !string.IsNullOrEmpty(item.replacedFileName)) && item.enable)
             {
                 this.replaceCfgMap.Add(item.oriFileName, item);
             }
         }
     }
 }