Exemple #1
0
    public static void WriteStreamingStrVer(EResourceVerType VerType, string Ver)
    {
        string path = Utility.LocalStoragePath + "/Ver/" + VerType.ToString();

        WriteFileVer(path, Ver);

        Dirty[(int)VerType]     = true;
        CachedVer[(int)VerType] = Ver;
    }
Exemple #2
0
    public static int ReadResourceVer(EResourceVerType VerType)
    {
        string Ver  = ReadResourceStrVer(VerType);
        int    iVer = 0;

        try
        {
            iVer = Convert.ToInt32(Ver);
        }
        catch
        {
        }
        return(iVer);
    }
Exemple #3
0
    public static string ReadStreamingStrVer(EResourceVerType VerType)
    {
        if (!Dirty[(int)VerType])
        {
            return(CachedVer[(int)VerType]);
        }

        string path = Utility.LocalStoragePath + "/Ver/" + VerType.ToString();

        string Ver = ReadFileVer(path);

        Dirty[(int)VerType]     = false;
        CachedVer[(int)VerType] = Ver;

        return(Ver);
    }
Exemple #4
0
    public static string ReadResourceStrVer(EResourceVerType VerType)
    {
        TextAsset asset = Resources.Load("LocalConfig/" + VerType.ToString()) as TextAsset;

        string Ver = "-1";

        if (asset != null)
        {
            Ver = asset.text;
        }

#if !DISTRIBUTION_VERSION
        //ssLogger.Log("ReadResourceStrVer:" + VerType + ":" + Ver);
#endif

        Resources.UnloadAsset(asset);
        return(Ver);
    }
Exemple #5
0
    public static void WriteResourceStrVer(EResourceVerType VerType, string Ver)
    {
        string path = Application.dataPath + "/Resources/LocalConfig/" + VerType.ToString() + ".txt";

        WriteFileVer(path, Ver);
    }
Exemple #6
0
 public static void WriteResourceVer(EResourceVerType VerType, int Ver)
 {
     WriteResourceStrVer(VerType, Ver.ToString());
 }
Exemple #7
0
    public static void RemoveStreamingVer(EResourceVerType VerType)
    {
        string path = Utility.LocalStoragePath + "/Ver/" + VerType.ToString();

        RemoveFileVer(path);
    }